1 <?php
namespace HL7\FHIR\STU3\FHIRDomainResource
;
4 * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using
5 * class definitions from HL7 FHIR (https://www.hl7.org/fhir/)
7 * Class creation date: February 10th, 2018
10 use HL7\FHIR\STU3\FHIRResource\FHIRDomainResource
;
13 * The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets.
14 * If the element is present, it must have either a @value, an @id, or extensions
16 class FHIRLibrary
extends FHIRDomainResource
implements \JsonSerializable
19 * An absolute URI that is used to identify this library when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this library is (or will be) published. The URL SHOULD include the major version of the library. For more information see [Technical and Business Versions](resource.html#versions).
20 * @var \HL7\FHIR\STU3\FHIRElement\FHIRUri
25 * A formal identifier that is used to identify this library when it is represented in other formats, or referenced in a specification, model, design or an instance. e.g. CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts.
26 * @var \HL7\FHIR\STU3\FHIRElement\FHIRIdentifier[]
28 public $identifier = [];
31 * The identifier that is used to identify this version of the library when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the library author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.
32 * @var \HL7\FHIR\STU3\FHIRElement\FHIRString
34 public $version = null;
37 * A natural language name identifying the library. This name should be usable as an identifier for the module by machine processing applications such as code generation.
38 * @var \HL7\FHIR\STU3\FHIRElement\FHIRString
43 * A short, descriptive, user-friendly title for the library.
44 * @var \HL7\FHIR\STU3\FHIRElement\FHIRString
49 * The status of this library. Enables tracking the life-cycle of the content.
50 * @var \HL7\FHIR\STU3\FHIRElement\FHIRPublicationStatus
52 public $status = null;
55 * A boolean value to indicate that this library is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
56 * @var \HL7\FHIR\STU3\FHIRElement\FHIRBoolean
58 public $experimental = null;
61 * Identifies the type of library such as a Logic Library, Model Definition, Asset Collection, or Module Definition.
62 * @var \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept
67 * The date (and optionally time) when the library was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the library changes.
68 * @var \HL7\FHIR\STU3\FHIRElement\FHIRDateTime
73 * The name of the individual or organization that published the library.
74 * @var \HL7\FHIR\STU3\FHIRElement\FHIRString
76 public $publisher = null;
79 * A free text natural language description of the library from a consumer's perspective.
80 * @var \HL7\FHIR\STU3\FHIRElement\FHIRMarkdown
82 public $description = null;
85 * Explaination of why this library is needed and why it has been designed as it has.
86 * @var \HL7\FHIR\STU3\FHIRElement\FHIRMarkdown
88 public $purpose = null;
91 * A detailed description of how the library is used from a clinical perspective.
92 * @var \HL7\FHIR\STU3\FHIRElement\FHIRString
97 * The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
98 * @var \HL7\FHIR\STU3\FHIRElement\FHIRDate
100 public $approvalDate = null;
103 * The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.
104 * @var \HL7\FHIR\STU3\FHIRElement\FHIRDate
106 public $lastReviewDate = null;
109 * The period during which the library content was or is planned to be in active use.
110 * @var \HL7\FHIR\STU3\FHIRElement\FHIRPeriod
112 public $effectivePeriod = null;
115 * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate library instances.
116 * @var \HL7\FHIR\STU3\FHIRElement\FHIRUsageContext[]
118 public $useContext = [];
121 * A legal or geographic region in which the library is intended to be used.
122 * @var \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept[]
124 public $jurisdiction = [];
127 * Descriptive topics related to the content of the library. Topics provide a high-level categorization of the library that can be useful for filtering and searching.
128 * @var \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept[]
133 * A contributor to the content of the library, including authors, editors, reviewers, and endorsers.
134 * @var \HL7\FHIR\STU3\FHIRElement\FHIRContributor[]
136 public $contributor = [];
139 * Contact details to assist a user in finding and communicating with the publisher.
140 * @var \HL7\FHIR\STU3\FHIRElement\FHIRContactDetail[]
142 public $contact = [];
145 * A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the library.
146 * @var \HL7\FHIR\STU3\FHIRElement\FHIRMarkdown
148 public $copyright = null;
151 * Related artifacts such as additional documentation, justification, or bibliographic references.
152 * @var \HL7\FHIR\STU3\FHIRElement\FHIRRelatedArtifact[]
154 public $relatedArtifact = [];
157 * The parameter element defines parameters used by the library.
158 * @var \HL7\FHIR\STU3\FHIRElement\FHIRParameterDefinition[]
160 public $parameter = [];
163 * Describes a set of data that must be provided in order to be able to successfully perform the computations defined by the library.
164 * @var \HL7\FHIR\STU3\FHIRElement\FHIRDataRequirement[]
166 public $dataRequirement = [];
169 * The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the contentType of the attachment determines how to interpret the content.
170 * @var \HL7\FHIR\STU3\FHIRElement\FHIRAttachment[]
172 public $content = [];
177 private $_fhirElementName = 'Library';
180 * An absolute URI that is used to identify this library when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this library is (or will be) published. The URL SHOULD include the major version of the library. For more information see [Technical and Business Versions](resource.html#versions).
181 * @return \HL7\FHIR\STU3\FHIRElement\FHIRUri
183 public function getUrl()
189 * An absolute URI that is used to identify this library when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this library is (or will be) published. The URL SHOULD include the major version of the library. For more information see [Technical and Business Versions](resource.html#versions).
190 * @param \HL7\FHIR\STU3\FHIRElement\FHIRUri $url
193 public function setUrl($url)
200 * A formal identifier that is used to identify this library when it is represented in other formats, or referenced in a specification, model, design or an instance. e.g. CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts.
201 * @return \HL7\FHIR\STU3\FHIRElement\FHIRIdentifier[]
203 public function getIdentifier()
205 return $this->identifier
;
209 * A formal identifier that is used to identify this library when it is represented in other formats, or referenced in a specification, model, design or an instance. e.g. CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts.
210 * @param \HL7\FHIR\STU3\FHIRElement\FHIRIdentifier $identifier
213 public function addIdentifier($identifier)
215 $this->identifier
[] = $identifier;
220 * The identifier that is used to identify this version of the library when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the library author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.
221 * @return \HL7\FHIR\STU3\FHIRElement\FHIRString
223 public function getVersion()
225 return $this->version
;
229 * The identifier that is used to identify this version of the library when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the library author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.
230 * @param \HL7\FHIR\STU3\FHIRElement\FHIRString $version
233 public function setVersion($version)
235 $this->version
= $version;
240 * A natural language name identifying the library. This name should be usable as an identifier for the module by machine processing applications such as code generation.
241 * @return \HL7\FHIR\STU3\FHIRElement\FHIRString
243 public function getName()
249 * A natural language name identifying the library. This name should be usable as an identifier for the module by machine processing applications such as code generation.
250 * @param \HL7\FHIR\STU3\FHIRElement\FHIRString $name
253 public function setName($name)
260 * A short, descriptive, user-friendly title for the library.
261 * @return \HL7\FHIR\STU3\FHIRElement\FHIRString
263 public function getTitle()
269 * A short, descriptive, user-friendly title for the library.
270 * @param \HL7\FHIR\STU3\FHIRElement\FHIRString $title
273 public function setTitle($title)
275 $this->title
= $title;
280 * The status of this library. Enables tracking the life-cycle of the content.
281 * @return \HL7\FHIR\STU3\FHIRElement\FHIRPublicationStatus
283 public function getStatus()
285 return $this->status
;
289 * The status of this library. Enables tracking the life-cycle of the content.
290 * @param \HL7\FHIR\STU3\FHIRElement\FHIRPublicationStatus $status
293 public function setStatus($status)
295 $this->status
= $status;
300 * A boolean value to indicate that this library is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
301 * @return \HL7\FHIR\STU3\FHIRElement\FHIRBoolean
303 public function getExperimental()
305 return $this->experimental
;
309 * A boolean value to indicate that this library is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
310 * @param \HL7\FHIR\STU3\FHIRElement\FHIRBoolean $experimental
313 public function setExperimental($experimental)
315 $this->experimental
= $experimental;
320 * Identifies the type of library such as a Logic Library, Model Definition, Asset Collection, or Module Definition.
321 * @return \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept
323 public function getType()
329 * Identifies the type of library such as a Logic Library, Model Definition, Asset Collection, or Module Definition.
330 * @param \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept $type
333 public function setType($type)
340 * The date (and optionally time) when the library was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the library changes.
341 * @return \HL7\FHIR\STU3\FHIRElement\FHIRDateTime
343 public function getDate()
349 * The date (and optionally time) when the library was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the library changes.
350 * @param \HL7\FHIR\STU3\FHIRElement\FHIRDateTime $date
353 public function setDate($date)
360 * The name of the individual or organization that published the library.
361 * @return \HL7\FHIR\STU3\FHIRElement\FHIRString
363 public function getPublisher()
365 return $this->publisher
;
369 * The name of the individual or organization that published the library.
370 * @param \HL7\FHIR\STU3\FHIRElement\FHIRString $publisher
373 public function setPublisher($publisher)
375 $this->publisher
= $publisher;
380 * A free text natural language description of the library from a consumer's perspective.
381 * @return \HL7\FHIR\STU3\FHIRElement\FHIRMarkdown
383 public function getDescription()
385 return $this->description
;
389 * A free text natural language description of the library from a consumer's perspective.
390 * @param \HL7\FHIR\STU3\FHIRElement\FHIRMarkdown $description
393 public function setDescription($description)
395 $this->description
= $description;
400 * Explaination of why this library is needed and why it has been designed as it has.
401 * @return \HL7\FHIR\STU3\FHIRElement\FHIRMarkdown
403 public function getPurpose()
405 return $this->purpose
;
409 * Explaination of why this library is needed and why it has been designed as it has.
410 * @param \HL7\FHIR\STU3\FHIRElement\FHIRMarkdown $purpose
413 public function setPurpose($purpose)
415 $this->purpose
= $purpose;
420 * A detailed description of how the library is used from a clinical perspective.
421 * @return \HL7\FHIR\STU3\FHIRElement\FHIRString
423 public function getUsage()
429 * A detailed description of how the library is used from a clinical perspective.
430 * @param \HL7\FHIR\STU3\FHIRElement\FHIRString $usage
433 public function setUsage($usage)
435 $this->usage
= $usage;
440 * The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
441 * @return \HL7\FHIR\STU3\FHIRElement\FHIRDate
443 public function getApprovalDate()
445 return $this->approvalDate
;
449 * The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
450 * @param \HL7\FHIR\STU3\FHIRElement\FHIRDate $approvalDate
453 public function setApprovalDate($approvalDate)
455 $this->approvalDate
= $approvalDate;
460 * The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.
461 * @return \HL7\FHIR\STU3\FHIRElement\FHIRDate
463 public function getLastReviewDate()
465 return $this->lastReviewDate
;
469 * The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.
470 * @param \HL7\FHIR\STU3\FHIRElement\FHIRDate $lastReviewDate
473 public function setLastReviewDate($lastReviewDate)
475 $this->lastReviewDate
= $lastReviewDate;
480 * The period during which the library content was or is planned to be in active use.
481 * @return \HL7\FHIR\STU3\FHIRElement\FHIRPeriod
483 public function getEffectivePeriod()
485 return $this->effectivePeriod
;
489 * The period during which the library content was or is planned to be in active use.
490 * @param \HL7\FHIR\STU3\FHIRElement\FHIRPeriod $effectivePeriod
493 public function setEffectivePeriod($effectivePeriod)
495 $this->effectivePeriod
= $effectivePeriod;
500 * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate library instances.
501 * @return \HL7\FHIR\STU3\FHIRElement\FHIRUsageContext[]
503 public function getUseContext()
505 return $this->useContext
;
509 * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate library instances.
510 * @param \HL7\FHIR\STU3\FHIRElement\FHIRUsageContext $useContext
513 public function addUseContext($useContext)
515 $this->useContext
[] = $useContext;
520 * A legal or geographic region in which the library is intended to be used.
521 * @return \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept[]
523 public function getJurisdiction()
525 return $this->jurisdiction
;
529 * A legal or geographic region in which the library is intended to be used.
530 * @param \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept $jurisdiction
533 public function addJurisdiction($jurisdiction)
535 $this->jurisdiction
[] = $jurisdiction;
540 * Descriptive topics related to the content of the library. Topics provide a high-level categorization of the library that can be useful for filtering and searching.
541 * @return \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept[]
543 public function getTopic()
549 * Descriptive topics related to the content of the library. Topics provide a high-level categorization of the library that can be useful for filtering and searching.
550 * @param \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept $topic
553 public function addTopic($topic)
555 $this->topic
[] = $topic;
560 * A contributor to the content of the library, including authors, editors, reviewers, and endorsers.
561 * @return \HL7\FHIR\STU3\FHIRElement\FHIRContributor[]
563 public function getContributor()
565 return $this->contributor
;
569 * A contributor to the content of the library, including authors, editors, reviewers, and endorsers.
570 * @param \HL7\FHIR\STU3\FHIRElement\FHIRContributor $contributor
573 public function addContributor($contributor)
575 $this->contributor
[] = $contributor;
580 * Contact details to assist a user in finding and communicating with the publisher.
581 * @return \HL7\FHIR\STU3\FHIRElement\FHIRContactDetail[]
583 public function getContact()
585 return $this->contact
;
589 * Contact details to assist a user in finding and communicating with the publisher.
590 * @param \HL7\FHIR\STU3\FHIRElement\FHIRContactDetail $contact
593 public function addContact($contact)
595 $this->contact
[] = $contact;
600 * A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the library.
601 * @return \HL7\FHIR\STU3\FHIRElement\FHIRMarkdown
603 public function getCopyright()
605 return $this->copyright
;
609 * A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the library.
610 * @param \HL7\FHIR\STU3\FHIRElement\FHIRMarkdown $copyright
613 public function setCopyright($copyright)
615 $this->copyright
= $copyright;
620 * Related artifacts such as additional documentation, justification, or bibliographic references.
621 * @return \HL7\FHIR\STU3\FHIRElement\FHIRRelatedArtifact[]
623 public function getRelatedArtifact()
625 return $this->relatedArtifact
;
629 * Related artifacts such as additional documentation, justification, or bibliographic references.
630 * @param \HL7\FHIR\STU3\FHIRElement\FHIRRelatedArtifact $relatedArtifact
633 public function addRelatedArtifact($relatedArtifact)
635 $this->relatedArtifact
[] = $relatedArtifact;
640 * The parameter element defines parameters used by the library.
641 * @return \HL7\FHIR\STU3\FHIRElement\FHIRParameterDefinition[]
643 public function getParameter()
645 return $this->parameter
;
649 * The parameter element defines parameters used by the library.
650 * @param \HL7\FHIR\STU3\FHIRElement\FHIRParameterDefinition $parameter
653 public function addParameter($parameter)
655 $this->parameter
[] = $parameter;
660 * Describes a set of data that must be provided in order to be able to successfully perform the computations defined by the library.
661 * @return \HL7\FHIR\STU3\FHIRElement\FHIRDataRequirement[]
663 public function getDataRequirement()
665 return $this->dataRequirement
;
669 * Describes a set of data that must be provided in order to be able to successfully perform the computations defined by the library.
670 * @param \HL7\FHIR\STU3\FHIRElement\FHIRDataRequirement $dataRequirement
673 public function addDataRequirement($dataRequirement)
675 $this->dataRequirement
[] = $dataRequirement;
680 * The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the contentType of the attachment determines how to interpret the content.
681 * @return \HL7\FHIR\STU3\FHIRElement\FHIRAttachment[]
683 public function getContent()
685 return $this->content
;
689 * The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the contentType of the attachment determines how to interpret the content.
690 * @param \HL7\FHIR\STU3\FHIRElement\FHIRAttachment $content
693 public function addContent($content)
695 $this->content
[] = $content;
702 public function get_fhirElementName()
704 return $this->_fhirElementName
;
710 public function __construct($data = [])
712 if (is_array($data)) {
713 if (isset($data['url'])) {
714 $this->setUrl($data['url']);
716 if (isset($data['identifier'])) {
717 if (is_array($data['identifier'])) {
718 foreach ($data['identifier'] as $d) {
719 $this->addIdentifier($d);
722 throw new \
InvalidArgumentException('"identifier" must be array of objects or null, '.gettype($data['identifier']).' seen.');
725 if (isset($data['version'])) {
726 $this->setVersion($data['version']);
728 if (isset($data['name'])) {
729 $this->setName($data['name']);
731 if (isset($data['title'])) {
732 $this->setTitle($data['title']);
734 if (isset($data['status'])) {
735 $this->setStatus($data['status']);
737 if (isset($data['experimental'])) {
738 $this->setExperimental($data['experimental']);
740 if (isset($data['type'])) {
741 $this->setType($data['type']);
743 if (isset($data['date'])) {
744 $this->setDate($data['date']);
746 if (isset($data['publisher'])) {
747 $this->setPublisher($data['publisher']);
749 if (isset($data['description'])) {
750 $this->setDescription($data['description']);
752 if (isset($data['purpose'])) {
753 $this->setPurpose($data['purpose']);
755 if (isset($data['usage'])) {
756 $this->setUsage($data['usage']);
758 if (isset($data['approvalDate'])) {
759 $this->setApprovalDate($data['approvalDate']);
761 if (isset($data['lastReviewDate'])) {
762 $this->setLastReviewDate($data['lastReviewDate']);
764 if (isset($data['effectivePeriod'])) {
765 $this->setEffectivePeriod($data['effectivePeriod']);
767 if (isset($data['useContext'])) {
768 if (is_array($data['useContext'])) {
769 foreach ($data['useContext'] as $d) {
770 $this->addUseContext($d);
773 throw new \
InvalidArgumentException('"useContext" must be array of objects or null, '.gettype($data['useContext']).' seen.');
776 if (isset($data['jurisdiction'])) {
777 if (is_array($data['jurisdiction'])) {
778 foreach ($data['jurisdiction'] as $d) {
779 $this->addJurisdiction($d);
782 throw new \
InvalidArgumentException('"jurisdiction" must be array of objects or null, '.gettype($data['jurisdiction']).' seen.');
785 if (isset($data['topic'])) {
786 if (is_array($data['topic'])) {
787 foreach ($data['topic'] as $d) {
791 throw new \
InvalidArgumentException('"topic" must be array of objects or null, '.gettype($data['topic']).' seen.');
794 if (isset($data['contributor'])) {
795 if (is_array($data['contributor'])) {
796 foreach ($data['contributor'] as $d) {
797 $this->addContributor($d);
800 throw new \
InvalidArgumentException('"contributor" must be array of objects or null, '.gettype($data['contributor']).' seen.');
803 if (isset($data['contact'])) {
804 if (is_array($data['contact'])) {
805 foreach ($data['contact'] as $d) {
806 $this->addContact($d);
809 throw new \
InvalidArgumentException('"contact" must be array of objects or null, '.gettype($data['contact']).' seen.');
812 if (isset($data['copyright'])) {
813 $this->setCopyright($data['copyright']);
815 if (isset($data['relatedArtifact'])) {
816 if (is_array($data['relatedArtifact'])) {
817 foreach ($data['relatedArtifact'] as $d) {
818 $this->addRelatedArtifact($d);
821 throw new \
InvalidArgumentException('"relatedArtifact" must be array of objects or null, '.gettype($data['relatedArtifact']).' seen.');
824 if (isset($data['parameter'])) {
825 if (is_array($data['parameter'])) {
826 foreach ($data['parameter'] as $d) {
827 $this->addParameter($d);
830 throw new \
InvalidArgumentException('"parameter" must be array of objects or null, '.gettype($data['parameter']).' seen.');
833 if (isset($data['dataRequirement'])) {
834 if (is_array($data['dataRequirement'])) {
835 foreach ($data['dataRequirement'] as $d) {
836 $this->addDataRequirement($d);
839 throw new \
InvalidArgumentException('"dataRequirement" must be array of objects or null, '.gettype($data['dataRequirement']).' seen.');
842 if (isset($data['content'])) {
843 if (is_array($data['content'])) {
844 foreach ($data['content'] as $d) {
845 $this->addContent($d);
848 throw new \
InvalidArgumentException('"content" must be array of objects or null, '.gettype($data['content']).' seen.');
851 } else if (null !== $data) {
852 throw new \
InvalidArgumentException('$data expected to be array of values, saw "'.gettype($data).'"');
854 parent
::__construct($data);
860 public function __toString()
862 return $this->get_fhirElementName();
868 public function jsonSerialize()
870 $json = parent
::jsonSerialize();
871 $json['resourceType'] = $this->_fhirElementName
;
872 if (isset($this->url
)) {
873 $json['url'] = $this->url
;
875 if (0 < count($this->identifier
)) {
876 $json['identifier'] = [];
877 foreach ($this->identifier
as $identifier) {
878 $json['identifier'][] = $identifier;
881 if (isset($this->version
)) {
882 $json['version'] = $this->version
;
884 if (isset($this->name
)) {
885 $json['name'] = $this->name
;
887 if (isset($this->title
)) {
888 $json['title'] = $this->title
;
890 if (isset($this->status
)) {
891 $json['status'] = $this->status
;
893 if (isset($this->experimental
)) {
894 $json['experimental'] = $this->experimental
;
896 if (isset($this->type
)) {
897 $json['type'] = $this->type
;
899 if (isset($this->date
)) {
900 $json['date'] = $this->date
;
902 if (isset($this->publisher
)) {
903 $json['publisher'] = $this->publisher
;
905 if (isset($this->description
)) {
906 $json['description'] = $this->description
;
908 if (isset($this->purpose
)) {
909 $json['purpose'] = $this->purpose
;
911 if (isset($this->usage
)) {
912 $json['usage'] = $this->usage
;
914 if (isset($this->approvalDate
)) {
915 $json['approvalDate'] = $this->approvalDate
;
917 if (isset($this->lastReviewDate
)) {
918 $json['lastReviewDate'] = $this->lastReviewDate
;
920 if (isset($this->effectivePeriod
)) {
921 $json['effectivePeriod'] = $this->effectivePeriod
;
923 if (0 < count($this->useContext
)) {
924 $json['useContext'] = [];
925 foreach ($this->useContext
as $useContext) {
926 $json['useContext'][] = $useContext;
929 if (0 < count($this->jurisdiction
)) {
930 $json['jurisdiction'] = [];
931 foreach ($this->jurisdiction
as $jurisdiction) {
932 $json['jurisdiction'][] = $jurisdiction;
935 if (0 < count($this->topic
)) {
937 foreach ($this->topic
as $topic) {
938 $json['topic'][] = $topic;
941 if (0 < count($this->contributor
)) {
942 $json['contributor'] = [];
943 foreach ($this->contributor
as $contributor) {
944 $json['contributor'][] = $contributor;
947 if (0 < count($this->contact
)) {
948 $json['contact'] = [];
949 foreach ($this->contact
as $contact) {
950 $json['contact'][] = $contact;
953 if (isset($this->copyright
)) {
954 $json['copyright'] = $this->copyright
;
956 if (0 < count($this->relatedArtifact
)) {
957 $json['relatedArtifact'] = [];
958 foreach ($this->relatedArtifact
as $relatedArtifact) {
959 $json['relatedArtifact'][] = $relatedArtifact;
962 if (0 < count($this->parameter
)) {
963 $json['parameter'] = [];
964 foreach ($this->parameter
as $parameter) {
965 $json['parameter'][] = $parameter;
968 if (0 < count($this->dataRequirement
)) {
969 $json['dataRequirement'] = [];
970 foreach ($this->dataRequirement
as $dataRequirement) {
971 $json['dataRequirement'][] = $dataRequirement;
974 if (0 < count($this->content
)) {
975 $json['content'] = [];
976 foreach ($this->content
as $content) {
977 $json['content'][] = $content;
984 * @param boolean $returnSXE
985 * @param \SimpleXMLElement $sxe
986 * @return string|\SimpleXMLElement
988 public function xmlSerialize($returnSXE = false, $sxe = null)
991 $sxe = new \
SimpleXMLElement('<Library xmlns="http://hl7.org/fhir"></Library>');
993 parent
::xmlSerialize(true, $sxe);
994 if (isset($this->url
)) {
995 $this->url
->xmlSerialize(true, $sxe->addChild('url'));
997 if (0 < count($this->identifier
)) {
998 foreach ($this->identifier
as $identifier) {
999 $identifier->xmlSerialize(true, $sxe->addChild('identifier'));
1002 if (isset($this->version
)) {
1003 $this->version
->xmlSerialize(true, $sxe->addChild('version'));
1005 if (isset($this->name
)) {
1006 $this->name
->xmlSerialize(true, $sxe->addChild('name'));
1008 if (isset($this->title
)) {
1009 $this->title
->xmlSerialize(true, $sxe->addChild('title'));
1011 if (isset($this->status
)) {
1012 $this->status
->xmlSerialize(true, $sxe->addChild('status'));
1014 if (isset($this->experimental
)) {
1015 $this->experimental
->xmlSerialize(true, $sxe->addChild('experimental'));
1017 if (isset($this->type
)) {
1018 $this->type
->xmlSerialize(true, $sxe->addChild('type'));
1020 if (isset($this->date
)) {
1021 $this->date
->xmlSerialize(true, $sxe->addChild('date'));
1023 if (isset($this->publisher
)) {
1024 $this->publisher
->xmlSerialize(true, $sxe->addChild('publisher'));
1026 if (isset($this->description
)) {
1027 $this->description
->xmlSerialize(true, $sxe->addChild('description'));
1029 if (isset($this->purpose
)) {
1030 $this->purpose
->xmlSerialize(true, $sxe->addChild('purpose'));
1032 if (isset($this->usage
)) {
1033 $this->usage
->xmlSerialize(true, $sxe->addChild('usage'));
1035 if (isset($this->approvalDate
)) {
1036 $this->approvalDate
->xmlSerialize(true, $sxe->addChild('approvalDate'));
1038 if (isset($this->lastReviewDate
)) {
1039 $this->lastReviewDate
->xmlSerialize(true, $sxe->addChild('lastReviewDate'));
1041 if (isset($this->effectivePeriod
)) {
1042 $this->effectivePeriod
->xmlSerialize(true, $sxe->addChild('effectivePeriod'));
1044 if (0 < count($this->useContext
)) {
1045 foreach ($this->useContext
as $useContext) {
1046 $useContext->xmlSerialize(true, $sxe->addChild('useContext'));
1049 if (0 < count($this->jurisdiction
)) {
1050 foreach ($this->jurisdiction
as $jurisdiction) {
1051 $jurisdiction->xmlSerialize(true, $sxe->addChild('jurisdiction'));
1054 if (0 < count($this->topic
)) {
1055 foreach ($this->topic
as $topic) {
1056 $topic->xmlSerialize(true, $sxe->addChild('topic'));
1059 if (0 < count($this->contributor
)) {
1060 foreach ($this->contributor
as $contributor) {
1061 $contributor->xmlSerialize(true, $sxe->addChild('contributor'));
1064 if (0 < count($this->contact
)) {
1065 foreach ($this->contact
as $contact) {
1066 $contact->xmlSerialize(true, $sxe->addChild('contact'));
1069 if (isset($this->copyright
)) {
1070 $this->copyright
->xmlSerialize(true, $sxe->addChild('copyright'));
1072 if (0 < count($this->relatedArtifact
)) {
1073 foreach ($this->relatedArtifact
as $relatedArtifact) {
1074 $relatedArtifact->xmlSerialize(true, $sxe->addChild('relatedArtifact'));
1077 if (0 < count($this->parameter
)) {
1078 foreach ($this->parameter
as $parameter) {
1079 $parameter->xmlSerialize(true, $sxe->addChild('parameter'));
1082 if (0 < count($this->dataRequirement
)) {
1083 foreach ($this->dataRequirement
as $dataRequirement) {
1084 $dataRequirement->xmlSerialize(true, $sxe->addChild('dataRequirement'));
1087 if (0 < count($this->content
)) {
1088 foreach ($this->content
as $content) {
1089 $content->xmlSerialize(true, $sxe->addChild('content'));
1095 return $sxe->saveXML();