-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from UNMCCC/master
Adding the EVN class (event segment)
- Loading branch information
Showing
2 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<?php | ||
|
||
namespace Aranyasen\HL7\Segments; | ||
|
||
use Aranyasen\HL7\Segment; | ||
|
||
/** | ||
* NTE segment class | ||
* Ref: https://corepointhealth.com/resource-center/hl7-resources/hl7-evn-event-type-segment | ||
*/ | ||
class EVN extends Segment | ||
{ | ||
/** | ||
* Index of this segment. Incremented for every new segment of this class created | ||
* @var int | ||
*/ | ||
protected static $setId = 1; | ||
|
||
public function __construct(array $fields = null) | ||
{ | ||
parent::__construct('EVN', $fields); | ||
$this->setID($this::$setId++); | ||
} | ||
|
||
public function setEventTypeCode($value, int $position = 1) | ||
{ | ||
return $this->setField($position, $value); | ||
} | ||
|
||
public function setRecordedDateTime($value, int $position = 2) | ||
{ | ||
return $this->setField($position, $value); | ||
} | ||
|
||
public function setDateTimeEvent($value, int $position = 3) | ||
{ | ||
return $this->setField($position, $value); | ||
} | ||
|
||
public function setEventReasonCode($value, int $position = 4) | ||
{ | ||
return $this->setField($position, $value); | ||
} | ||
|
||
public function setOperatorID($value, int $position = 5) | ||
{ | ||
return $this->setField($position, $value); | ||
} | ||
|
||
public function setEventOccurred($value, int $position = 6) | ||
{ | ||
return $this->setField($position, $value); | ||
} | ||
|
||
public function getEventTypeCode(int $position = 1) | ||
{ | ||
return $this->getField($position); | ||
} | ||
|
||
public function getRecordedDateTime(int $position = 2) | ||
{ | ||
return $this->getField($position); | ||
} | ||
|
||
public function getDateTimeEvent(int $position = 3) | ||
{ | ||
return $this->getField($position); | ||
} | ||
|
||
public function getEventReasonCode(int $position = 4) | ||
{ | ||
return $this->getField($position); | ||
} | ||
|
||
public function getOperatorID(int $position = 5) | ||
{ | ||
return $this->setField($position); | ||
} | ||
|
||
public function getEventOccurred(int $position = 6) | ||
{ | ||
return $this->setField($position); | ||
} | ||
} |