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 * A task to be performed.
14 * If the element is present, it must have either a @value, an @id, or extensions
16 class FHIRTask
extends FHIRDomainResource
implements \JsonSerializable
19 * The business identifier for this task.
20 * @var \HL7\FHIR\STU3\FHIRElement\FHIRIdentifier[]
22 public $identifier = [];
25 * @var \HL7\FHIR\STU3\FHIRElement\FHIRUri
27 public $definitionUri = null;
30 * @var \HL7\FHIR\STU3\FHIRElement\FHIRReference
32 public $definitionReference = null;
35 * BasedOn refers to a higher-level authorization that triggered the creation of the task. It references a "request" resource such as a ProcedureRequest, MedicationRequest, ProcedureRequest, CarePlan, etc. which is distinct from the "request" resource the task is seeking to fulfil. This latter resource is referenced by FocusOn. For example, based on a ProcedureRequest (= BasedOn), a task is created to fulfil a procedureRequest ( = FocusOn ) to collect a specimen from a patient.
36 * @var \HL7\FHIR\STU3\FHIRElement\FHIRReference[]
41 * An identifier that links together multiple tasks and other requests that were created in the same context.
42 * @var \HL7\FHIR\STU3\FHIRElement\FHIRIdentifier
44 public $groupIdentifier = null;
47 * Task that this particular task is part of.
48 * @var \HL7\FHIR\STU3\FHIRElement\FHIRReference[]
53 * The current status of the task.
54 * @var \HL7\FHIR\STU3\FHIRElement\FHIRTaskStatus
56 public $status = null;
59 * An explanation as to why this task is held, failed, was refused, etc.
60 * @var \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept
62 public $statusReason = null;
65 * Contains business-specific nuances of the business state.
66 * @var \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept
68 public $businessStatus = null;
71 * Indicates the "level" of actionability associated with the Task. I.e. Is this a proposed task, a planned task, an actionable task, etc.
72 * @var \HL7\FHIR\STU3\FHIRElement\FHIRRequestIntent
74 public $intent = null;
77 * Indicates how quickly the Task should be addressed with respect to other requests.
78 * @var \HL7\FHIR\STU3\FHIRElement\FHIRRequestPriority
80 public $priority = null;
83 * A name or code (or both) briefly describing what the task involves.
84 * @var \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept
89 * A free-text description of what is to be performed.
90 * @var \HL7\FHIR\STU3\FHIRElement\FHIRString
92 public $description = null;
95 * The request being actioned or the resource being manipulated by this task.
96 * @var \HL7\FHIR\STU3\FHIRElement\FHIRReference
101 * The entity who benefits from the performance of the service specified in the task (e.g., the patient).
102 * @var \HL7\FHIR\STU3\FHIRElement\FHIRReference
107 * The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.
108 * @var \HL7\FHIR\STU3\FHIRElement\FHIRReference
110 public $context = null;
113 * Identifies the time action was first taken against the task (start) and/or the time final action was taken against the task prior to marking it as completed (end).
114 * @var \HL7\FHIR\STU3\FHIRElement\FHIRPeriod
116 public $executionPeriod = null;
119 * The date and time this task was created.
120 * @var \HL7\FHIR\STU3\FHIRElement\FHIRDateTime
122 public $authoredOn = null;
125 * The date and time of last modification to this task.
126 * @var \HL7\FHIR\STU3\FHIRElement\FHIRDateTime
128 public $lastModified = null;
131 * The creator of the task.
132 * @var \HL7\FHIR\STU3\FHIRResource\FHIRTask\FHIRTaskRequester
134 public $requester = null;
137 * The type of participant that can execute the task.
138 * @var \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept[]
140 public $performerType = [];
143 * Individual organization or Device currently responsible for task execution.
144 * @var \HL7\FHIR\STU3\FHIRElement\FHIRReference
146 public $owner = null;
149 * A description or code indicating why this task needs to be performed.
150 * @var \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept
152 public $reason = null;
155 * Free-text information captured about the task as it progresses.
156 * @var \HL7\FHIR\STU3\FHIRElement\FHIRAnnotation[]
161 * Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task.
162 * @var \HL7\FHIR\STU3\FHIRElement\FHIRReference[]
164 public $relevantHistory = [];
167 * If the Task.focus is a request resource and the task is seeking fulfillment (i.e is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.
168 * @var \HL7\FHIR\STU3\FHIRResource\FHIRTask\FHIRTaskRestriction
170 public $restriction = null;
173 * Additional information that may be needed in the execution of the task.
174 * @var \HL7\FHIR\STU3\FHIRResource\FHIRTask\FHIRTaskInput[]
179 * Outputs produced by the Task.
180 * @var \HL7\FHIR\STU3\FHIRResource\FHIRTask\FHIRTaskOutput[]
187 private $_fhirElementName = 'Task';
190 * The business identifier for this task.
191 * @return \HL7\FHIR\STU3\FHIRElement\FHIRIdentifier[]
193 public function getIdentifier()
195 return $this->identifier
;
199 * The business identifier for this task.
200 * @param \HL7\FHIR\STU3\FHIRElement\FHIRIdentifier $identifier
203 public function addIdentifier($identifier)
205 $this->identifier
[] = $identifier;
210 * @return \HL7\FHIR\STU3\FHIRElement\FHIRUri
212 public function getDefinitionUri()
214 return $this->definitionUri
;
218 * @param \HL7\FHIR\STU3\FHIRElement\FHIRUri $definitionUri
221 public function setDefinitionUri($definitionUri)
223 $this->definitionUri
= $definitionUri;
228 * @return \HL7\FHIR\STU3\FHIRElement\FHIRReference
230 public function getDefinitionReference()
232 return $this->definitionReference
;
236 * @param \HL7\FHIR\STU3\FHIRElement\FHIRReference $definitionReference
239 public function setDefinitionReference($definitionReference)
241 $this->definitionReference
= $definitionReference;
246 * BasedOn refers to a higher-level authorization that triggered the creation of the task. It references a "request" resource such as a ProcedureRequest, MedicationRequest, ProcedureRequest, CarePlan, etc. which is distinct from the "request" resource the task is seeking to fulfil. This latter resource is referenced by FocusOn. For example, based on a ProcedureRequest (= BasedOn), a task is created to fulfil a procedureRequest ( = FocusOn ) to collect a specimen from a patient.
247 * @return \HL7\FHIR\STU3\FHIRElement\FHIRReference[]
249 public function getBasedOn()
251 return $this->basedOn
;
255 * BasedOn refers to a higher-level authorization that triggered the creation of the task. It references a "request" resource such as a ProcedureRequest, MedicationRequest, ProcedureRequest, CarePlan, etc. which is distinct from the "request" resource the task is seeking to fulfil. This latter resource is referenced by FocusOn. For example, based on a ProcedureRequest (= BasedOn), a task is created to fulfil a procedureRequest ( = FocusOn ) to collect a specimen from a patient.
256 * @param \HL7\FHIR\STU3\FHIRElement\FHIRReference $basedOn
259 public function addBasedOn($basedOn)
261 $this->basedOn
[] = $basedOn;
266 * An identifier that links together multiple tasks and other requests that were created in the same context.
267 * @return \HL7\FHIR\STU3\FHIRElement\FHIRIdentifier
269 public function getGroupIdentifier()
271 return $this->groupIdentifier
;
275 * An identifier that links together multiple tasks and other requests that were created in the same context.
276 * @param \HL7\FHIR\STU3\FHIRElement\FHIRIdentifier $groupIdentifier
279 public function setGroupIdentifier($groupIdentifier)
281 $this->groupIdentifier
= $groupIdentifier;
286 * Task that this particular task is part of.
287 * @return \HL7\FHIR\STU3\FHIRElement\FHIRReference[]
289 public function getPartOf()
291 return $this->partOf
;
295 * Task that this particular task is part of.
296 * @param \HL7\FHIR\STU3\FHIRElement\FHIRReference $partOf
299 public function addPartOf($partOf)
301 $this->partOf
[] = $partOf;
306 * The current status of the task.
307 * @return \HL7\FHIR\STU3\FHIRElement\FHIRTaskStatus
309 public function getStatus()
311 return $this->status
;
315 * The current status of the task.
316 * @param \HL7\FHIR\STU3\FHIRElement\FHIRTaskStatus $status
319 public function setStatus($status)
321 $this->status
= $status;
326 * An explanation as to why this task is held, failed, was refused, etc.
327 * @return \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept
329 public function getStatusReason()
331 return $this->statusReason
;
335 * An explanation as to why this task is held, failed, was refused, etc.
336 * @param \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept $statusReason
339 public function setStatusReason($statusReason)
341 $this->statusReason
= $statusReason;
346 * Contains business-specific nuances of the business state.
347 * @return \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept
349 public function getBusinessStatus()
351 return $this->businessStatus
;
355 * Contains business-specific nuances of the business state.
356 * @param \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept $businessStatus
359 public function setBusinessStatus($businessStatus)
361 $this->businessStatus
= $businessStatus;
366 * Indicates the "level" of actionability associated with the Task. I.e. Is this a proposed task, a planned task, an actionable task, etc.
367 * @return \HL7\FHIR\STU3\FHIRElement\FHIRRequestIntent
369 public function getIntent()
371 return $this->intent
;
375 * Indicates the "level" of actionability associated with the Task. I.e. Is this a proposed task, a planned task, an actionable task, etc.
376 * @param \HL7\FHIR\STU3\FHIRElement\FHIRRequestIntent $intent
379 public function setIntent($intent)
381 $this->intent
= $intent;
386 * Indicates how quickly the Task should be addressed with respect to other requests.
387 * @return \HL7\FHIR\STU3\FHIRElement\FHIRRequestPriority
389 public function getPriority()
391 return $this->priority
;
395 * Indicates how quickly the Task should be addressed with respect to other requests.
396 * @param \HL7\FHIR\STU3\FHIRElement\FHIRRequestPriority $priority
399 public function setPriority($priority)
401 $this->priority
= $priority;
406 * A name or code (or both) briefly describing what the task involves.
407 * @return \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept
409 public function getCode()
415 * A name or code (or both) briefly describing what the task involves.
416 * @param \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept $code
419 public function setCode($code)
426 * A free-text description of what is to be performed.
427 * @return \HL7\FHIR\STU3\FHIRElement\FHIRString
429 public function getDescription()
431 return $this->description
;
435 * A free-text description of what is to be performed.
436 * @param \HL7\FHIR\STU3\FHIRElement\FHIRString $description
439 public function setDescription($description)
441 $this->description
= $description;
446 * The request being actioned or the resource being manipulated by this task.
447 * @return \HL7\FHIR\STU3\FHIRElement\FHIRReference
449 public function getFocus()
455 * The request being actioned or the resource being manipulated by this task.
456 * @param \HL7\FHIR\STU3\FHIRElement\FHIRReference $focus
459 public function setFocus($focus)
461 $this->focus
= $focus;
466 * The entity who benefits from the performance of the service specified in the task (e.g., the patient).
467 * @return \HL7\FHIR\STU3\FHIRElement\FHIRReference
469 public function getFor()
475 * The entity who benefits from the performance of the service specified in the task (e.g., the patient).
476 * @param \HL7\FHIR\STU3\FHIRElement\FHIRReference $for
479 public function setFor($for)
486 * The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.
487 * @return \HL7\FHIR\STU3\FHIRElement\FHIRReference
489 public function getContext()
491 return $this->context
;
495 * The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.
496 * @param \HL7\FHIR\STU3\FHIRElement\FHIRReference $context
499 public function setContext($context)
501 $this->context
= $context;
506 * Identifies the time action was first taken against the task (start) and/or the time final action was taken against the task prior to marking it as completed (end).
507 * @return \HL7\FHIR\STU3\FHIRElement\FHIRPeriod
509 public function getExecutionPeriod()
511 return $this->executionPeriod
;
515 * Identifies the time action was first taken against the task (start) and/or the time final action was taken against the task prior to marking it as completed (end).
516 * @param \HL7\FHIR\STU3\FHIRElement\FHIRPeriod $executionPeriod
519 public function setExecutionPeriod($executionPeriod)
521 $this->executionPeriod
= $executionPeriod;
526 * The date and time this task was created.
527 * @return \HL7\FHIR\STU3\FHIRElement\FHIRDateTime
529 public function getAuthoredOn()
531 return $this->authoredOn
;
535 * The date and time this task was created.
536 * @param \HL7\FHIR\STU3\FHIRElement\FHIRDateTime $authoredOn
539 public function setAuthoredOn($authoredOn)
541 $this->authoredOn
= $authoredOn;
546 * The date and time of last modification to this task.
547 * @return \HL7\FHIR\STU3\FHIRElement\FHIRDateTime
549 public function getLastModified()
551 return $this->lastModified
;
555 * The date and time of last modification to this task.
556 * @param \HL7\FHIR\STU3\FHIRElement\FHIRDateTime $lastModified
559 public function setLastModified($lastModified)
561 $this->lastModified
= $lastModified;
566 * The creator of the task.
567 * @return \HL7\FHIR\STU3\FHIRResource\FHIRTask\FHIRTaskRequester
569 public function getRequester()
571 return $this->requester
;
575 * The creator of the task.
576 * @param \HL7\FHIR\STU3\FHIRResource\FHIRTask\FHIRTaskRequester $requester
579 public function setRequester($requester)
581 $this->requester
= $requester;
586 * The type of participant that can execute the task.
587 * @return \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept[]
589 public function getPerformerType()
591 return $this->performerType
;
595 * The type of participant that can execute the task.
596 * @param \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept $performerType
599 public function addPerformerType($performerType)
601 $this->performerType
[] = $performerType;
606 * Individual organization or Device currently responsible for task execution.
607 * @return \HL7\FHIR\STU3\FHIRElement\FHIRReference
609 public function getOwner()
615 * Individual organization or Device currently responsible for task execution.
616 * @param \HL7\FHIR\STU3\FHIRElement\FHIRReference $owner
619 public function setOwner($owner)
621 $this->owner
= $owner;
626 * A description or code indicating why this task needs to be performed.
627 * @return \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept
629 public function getReason()
631 return $this->reason
;
635 * A description or code indicating why this task needs to be performed.
636 * @param \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept $reason
639 public function setReason($reason)
641 $this->reason
= $reason;
646 * Free-text information captured about the task as it progresses.
647 * @return \HL7\FHIR\STU3\FHIRElement\FHIRAnnotation[]
649 public function getNote()
655 * Free-text information captured about the task as it progresses.
656 * @param \HL7\FHIR\STU3\FHIRElement\FHIRAnnotation $note
659 public function addNote($note)
661 $this->note
[] = $note;
666 * Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task.
667 * @return \HL7\FHIR\STU3\FHIRElement\FHIRReference[]
669 public function getRelevantHistory()
671 return $this->relevantHistory
;
675 * Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task.
676 * @param \HL7\FHIR\STU3\FHIRElement\FHIRReference $relevantHistory
679 public function addRelevantHistory($relevantHistory)
681 $this->relevantHistory
[] = $relevantHistory;
686 * If the Task.focus is a request resource and the task is seeking fulfillment (i.e is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.
687 * @return \HL7\FHIR\STU3\FHIRResource\FHIRTask\FHIRTaskRestriction
689 public function getRestriction()
691 return $this->restriction
;
695 * If the Task.focus is a request resource and the task is seeking fulfillment (i.e is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.
696 * @param \HL7\FHIR\STU3\FHIRResource\FHIRTask\FHIRTaskRestriction $restriction
699 public function setRestriction($restriction)
701 $this->restriction
= $restriction;
706 * Additional information that may be needed in the execution of the task.
707 * @return \HL7\FHIR\STU3\FHIRResource\FHIRTask\FHIRTaskInput[]
709 public function getInput()
715 * Additional information that may be needed in the execution of the task.
716 * @param \HL7\FHIR\STU3\FHIRResource\FHIRTask\FHIRTaskInput $input
719 public function addInput($input)
721 $this->input
[] = $input;
726 * Outputs produced by the Task.
727 * @return \HL7\FHIR\STU3\FHIRResource\FHIRTask\FHIRTaskOutput[]
729 public function getOutput()
731 return $this->output
;
735 * Outputs produced by the Task.
736 * @param \HL7\FHIR\STU3\FHIRResource\FHIRTask\FHIRTaskOutput $output
739 public function addOutput($output)
741 $this->output
[] = $output;
748 public function get_fhirElementName()
750 return $this->_fhirElementName
;
756 public function __construct($data = [])
758 if (is_array($data)) {
759 if (isset($data['identifier'])) {
760 if (is_array($data['identifier'])) {
761 foreach ($data['identifier'] as $d) {
762 $this->addIdentifier($d);
765 throw new \
InvalidArgumentException('"identifier" must be array of objects or null, '.gettype($data['identifier']).' seen.');
768 if (isset($data['definitionUri'])) {
769 $this->setDefinitionUri($data['definitionUri']);
771 if (isset($data['definitionReference'])) {
772 $this->setDefinitionReference($data['definitionReference']);
774 if (isset($data['basedOn'])) {
775 if (is_array($data['basedOn'])) {
776 foreach ($data['basedOn'] as $d) {
777 $this->addBasedOn($d);
780 throw new \
InvalidArgumentException('"basedOn" must be array of objects or null, '.gettype($data['basedOn']).' seen.');
783 if (isset($data['groupIdentifier'])) {
784 $this->setGroupIdentifier($data['groupIdentifier']);
786 if (isset($data['partOf'])) {
787 if (is_array($data['partOf'])) {
788 foreach ($data['partOf'] as $d) {
789 $this->addPartOf($d);
792 throw new \
InvalidArgumentException('"partOf" must be array of objects or null, '.gettype($data['partOf']).' seen.');
795 if (isset($data['status'])) {
796 $this->setStatus($data['status']);
798 if (isset($data['statusReason'])) {
799 $this->setStatusReason($data['statusReason']);
801 if (isset($data['businessStatus'])) {
802 $this->setBusinessStatus($data['businessStatus']);
804 if (isset($data['intent'])) {
805 $this->setIntent($data['intent']);
807 if (isset($data['priority'])) {
808 $this->setPriority($data['priority']);
810 if (isset($data['code'])) {
811 $this->setCode($data['code']);
813 if (isset($data['description'])) {
814 $this->setDescription($data['description']);
816 if (isset($data['focus'])) {
817 $this->setFocus($data['focus']);
819 if (isset($data['for'])) {
820 $this->setFor($data['for']);
822 if (isset($data['context'])) {
823 $this->setContext($data['context']);
825 if (isset($data['executionPeriod'])) {
826 $this->setExecutionPeriod($data['executionPeriod']);
828 if (isset($data['authoredOn'])) {
829 $this->setAuthoredOn($data['authoredOn']);
831 if (isset($data['lastModified'])) {
832 $this->setLastModified($data['lastModified']);
834 if (isset($data['requester'])) {
835 $this->setRequester($data['requester']);
837 if (isset($data['performerType'])) {
838 if (is_array($data['performerType'])) {
839 foreach ($data['performerType'] as $d) {
840 $this->addPerformerType($d);
843 throw new \
InvalidArgumentException('"performerType" must be array of objects or null, '.gettype($data['performerType']).' seen.');
846 if (isset($data['owner'])) {
847 $this->setOwner($data['owner']);
849 if (isset($data['reason'])) {
850 $this->setReason($data['reason']);
852 if (isset($data['note'])) {
853 if (is_array($data['note'])) {
854 foreach ($data['note'] as $d) {
858 throw new \
InvalidArgumentException('"note" must be array of objects or null, '.gettype($data['note']).' seen.');
861 if (isset($data['relevantHistory'])) {
862 if (is_array($data['relevantHistory'])) {
863 foreach ($data['relevantHistory'] as $d) {
864 $this->addRelevantHistory($d);
867 throw new \
InvalidArgumentException('"relevantHistory" must be array of objects or null, '.gettype($data['relevantHistory']).' seen.');
870 if (isset($data['restriction'])) {
871 $this->setRestriction($data['restriction']);
873 if (isset($data['input'])) {
874 if (is_array($data['input'])) {
875 foreach ($data['input'] as $d) {
879 throw new \
InvalidArgumentException('"input" must be array of objects or null, '.gettype($data['input']).' seen.');
882 if (isset($data['output'])) {
883 if (is_array($data['output'])) {
884 foreach ($data['output'] as $d) {
885 $this->addOutput($d);
888 throw new \
InvalidArgumentException('"output" must be array of objects or null, '.gettype($data['output']).' seen.');
891 } else if (null !== $data) {
892 throw new \
InvalidArgumentException('$data expected to be array of values, saw "'.gettype($data).'"');
894 parent
::__construct($data);
900 public function __toString()
902 return $this->get_fhirElementName();
908 public function jsonSerialize()
910 $json = parent
::jsonSerialize();
911 $json['resourceType'] = $this->_fhirElementName
;
912 if (0 < count($this->identifier
)) {
913 $json['identifier'] = [];
914 foreach ($this->identifier
as $identifier) {
915 $json['identifier'][] = $identifier;
918 if (isset($this->definitionUri
)) {
919 $json['definitionUri'] = $this->definitionUri
;
921 if (isset($this->definitionReference
)) {
922 $json['definitionReference'] = $this->definitionReference
;
924 if (0 < count($this->basedOn
)) {
925 $json['basedOn'] = [];
926 foreach ($this->basedOn
as $basedOn) {
927 $json['basedOn'][] = $basedOn;
930 if (isset($this->groupIdentifier
)) {
931 $json['groupIdentifier'] = $this->groupIdentifier
;
933 if (0 < count($this->partOf
)) {
934 $json['partOf'] = [];
935 foreach ($this->partOf
as $partOf) {
936 $json['partOf'][] = $partOf;
939 if (isset($this->status
)) {
940 $json['status'] = $this->status
;
942 if (isset($this->statusReason
)) {
943 $json['statusReason'] = $this->statusReason
;
945 if (isset($this->businessStatus
)) {
946 $json['businessStatus'] = $this->businessStatus
;
948 if (isset($this->intent
)) {
949 $json['intent'] = $this->intent
;
951 if (isset($this->priority
)) {
952 $json['priority'] = $this->priority
;
954 if (isset($this->code
)) {
955 $json['code'] = $this->code
;
957 if (isset($this->description
)) {
958 $json['description'] = $this->description
;
960 if (isset($this->focus
)) {
961 $json['focus'] = $this->focus
;
963 if (isset($this->for)) {
964 $json['for'] = $this->for;
966 if (isset($this->context
)) {
967 $json['context'] = $this->context
;
969 if (isset($this->executionPeriod
)) {
970 $json['executionPeriod'] = $this->executionPeriod
;
972 if (isset($this->authoredOn
)) {
973 $json['authoredOn'] = $this->authoredOn
;
975 if (isset($this->lastModified
)) {
976 $json['lastModified'] = $this->lastModified
;
978 if (isset($this->requester
)) {
979 $json['requester'] = $this->requester
;
981 if (0 < count($this->performerType
)) {
982 $json['performerType'] = [];
983 foreach ($this->performerType
as $performerType) {
984 $json['performerType'][] = $performerType;
987 if (isset($this->owner
)) {
988 $json['owner'] = $this->owner
;
990 if (isset($this->reason
)) {
991 $json['reason'] = $this->reason
;
993 if (0 < count($this->note
)) {
995 foreach ($this->note
as $note) {
996 $json['note'][] = $note;
999 if (0 < count($this->relevantHistory
)) {
1000 $json['relevantHistory'] = [];
1001 foreach ($this->relevantHistory
as $relevantHistory) {
1002 $json['relevantHistory'][] = $relevantHistory;
1005 if (isset($this->restriction
)) {
1006 $json['restriction'] = $this->restriction
;
1008 if (0 < count($this->input
)) {
1009 $json['input'] = [];
1010 foreach ($this->input
as $input) {
1011 $json['input'][] = $input;
1014 if (0 < count($this->output
)) {
1015 $json['output'] = [];
1016 foreach ($this->output
as $output) {
1017 $json['output'][] = $output;
1024 * @param boolean $returnSXE
1025 * @param \SimpleXMLElement $sxe
1026 * @return string|\SimpleXMLElement
1028 public function xmlSerialize($returnSXE = false, $sxe = null)
1030 if (null === $sxe) {
1031 $sxe = new \
SimpleXMLElement('<Task xmlns="http://hl7.org/fhir"></Task>');
1033 parent
::xmlSerialize(true, $sxe);
1034 if (0 < count($this->identifier
)) {
1035 foreach ($this->identifier
as $identifier) {
1036 $identifier->xmlSerialize(true, $sxe->addChild('identifier'));
1039 if (isset($this->definitionUri
)) {
1040 $this->definitionUri
->xmlSerialize(true, $sxe->addChild('definitionUri'));
1042 if (isset($this->definitionReference
)) {
1043 $this->definitionReference
->xmlSerialize(true, $sxe->addChild('definitionReference'));
1045 if (0 < count($this->basedOn
)) {
1046 foreach ($this->basedOn
as $basedOn) {
1047 $basedOn->xmlSerialize(true, $sxe->addChild('basedOn'));
1050 if (isset($this->groupIdentifier
)) {
1051 $this->groupIdentifier
->xmlSerialize(true, $sxe->addChild('groupIdentifier'));
1053 if (0 < count($this->partOf
)) {
1054 foreach ($this->partOf
as $partOf) {
1055 $partOf->xmlSerialize(true, $sxe->addChild('partOf'));
1058 if (isset($this->status
)) {
1059 $this->status
->xmlSerialize(true, $sxe->addChild('status'));
1061 if (isset($this->statusReason
)) {
1062 $this->statusReason
->xmlSerialize(true, $sxe->addChild('statusReason'));
1064 if (isset($this->businessStatus
)) {
1065 $this->businessStatus
->xmlSerialize(true, $sxe->addChild('businessStatus'));
1067 if (isset($this->intent
)) {
1068 $this->intent
->xmlSerialize(true, $sxe->addChild('intent'));
1070 if (isset($this->priority
)) {
1071 $this->priority
->xmlSerialize(true, $sxe->addChild('priority'));
1073 if (isset($this->code
)) {
1074 $this->code
->xmlSerialize(true, $sxe->addChild('code'));
1076 if (isset($this->description
)) {
1077 $this->description
->xmlSerialize(true, $sxe->addChild('description'));
1079 if (isset($this->focus
)) {
1080 $this->focus
->xmlSerialize(true, $sxe->addChild('focus'));
1082 if (isset($this->for)) {
1083 $this->for->xmlSerialize(true, $sxe->addChild('for'));
1085 if (isset($this->context
)) {
1086 $this->context
->xmlSerialize(true, $sxe->addChild('context'));
1088 if (isset($this->executionPeriod
)) {
1089 $this->executionPeriod
->xmlSerialize(true, $sxe->addChild('executionPeriod'));
1091 if (isset($this->authoredOn
)) {
1092 $this->authoredOn
->xmlSerialize(true, $sxe->addChild('authoredOn'));
1094 if (isset($this->lastModified
)) {
1095 $this->lastModified
->xmlSerialize(true, $sxe->addChild('lastModified'));
1097 if (isset($this->requester
)) {
1098 $this->requester
->xmlSerialize(true, $sxe->addChild('requester'));
1100 if (0 < count($this->performerType
)) {
1101 foreach ($this->performerType
as $performerType) {
1102 $performerType->xmlSerialize(true, $sxe->addChild('performerType'));
1105 if (isset($this->owner
)) {
1106 $this->owner
->xmlSerialize(true, $sxe->addChild('owner'));
1108 if (isset($this->reason
)) {
1109 $this->reason
->xmlSerialize(true, $sxe->addChild('reason'));
1111 if (0 < count($this->note
)) {
1112 foreach ($this->note
as $note) {
1113 $note->xmlSerialize(true, $sxe->addChild('note'));
1116 if (0 < count($this->relevantHistory
)) {
1117 foreach ($this->relevantHistory
as $relevantHistory) {
1118 $relevantHistory->xmlSerialize(true, $sxe->addChild('relevantHistory'));
1121 if (isset($this->restriction
)) {
1122 $this->restriction
->xmlSerialize(true, $sxe->addChild('restriction'));
1124 if (0 < count($this->input
)) {
1125 foreach ($this->input
as $input) {
1126 $input->xmlSerialize(true, $sxe->addChild('input'));
1129 if (0 < count($this->output
)) {
1130 foreach ($this->output
as $output) {
1131 $output->xmlSerialize(true, $sxe->addChild('output'));
1137 return $sxe->saveXML();