Skip to content

Commit

Permalink
Add Segments: FHS & FTS (#60)
Browse files Browse the repository at this point in the history
Add Segments: FHS & FTS
  • Loading branch information
tysonlist authored Oct 20, 2021
1 parent 1257e4f commit 95e96b6
Show file tree
Hide file tree
Showing 2 changed files with 180 additions and 0 deletions.
140 changes: 140 additions & 0 deletions src/HL7/Segments/FHS.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
<?php

namespace Aranyasen\HL7\Segments;

use Aranyasen\HL7\Segment;

/**
* FHS: File Header Segment
* Ref: https://hl7-definition.caristix.com/v2/HL7v2.3/Segments/FHS
*/
class FHS extends Segment
{
public function __construct(array $fields = null)
{
parent::__construct('FHS', $fields);
}

public function setFileFieldSeparator($value, int $position = 1)
{
return $this->setField($position, $value);
}

public function setFileEncodingCharacters($value, int $position = 2)
{
return $this->setField($position, $value);
}

public function setFileSendingApplication($value, int $position = 3)
{
return $this->setField($position, $value);
}

public function setFileSendingFacility($value, int $position = 4)
{
return $this->setField($position, $value);
}

public function setFileRecievingApplication($value, int $position = 5)
{
return $this->setField($position, $value);
}

public function setFileRecievingFacility($value, int $position = 6)
{
return $this->setField($position, $value);
}

public function setFileCreationDateTime($value, int $position = 7)
{
return $this->setField($position, $value);
}

public function setFileSecurity($value, int $position = 8)
{
return $this->setField($position, $value);
}

public function setFileNameId($value, int $position = 9)
{
return $this->setField($position, $value);
}

public function setFileHeaderComment($value, int $position = 10)
{
return $this->setField($position, $value);
}

public function setFileControlId($value, int $position = 11)
{
return $this->setField($position, $value);
}

public function setReferenceFileControlId($value, int $position = 12)
{
return $this->setField($position, $value);
}

// -------------------- Getter Methods ------------------------------

public function getFileFieldSeparator(int $position = 1)
{
return $this->getField($position);
}

public function getFileEncodingCharacters(int $position = 2)
{
return $this->getField($position);
}

public function getFileSendingApplication(int $position = 3)
{
return $this->getField($position);
}

public function getFileSendingFacility(int $position = 4)
{
return $this->getField($position);
}

public function getFileRecievingApplication(int $position = 5)
{
return $this->getField($position);
}

public function getFileRecievingFacility(int $position = 6)
{
return $this->getField($position);
}

public function getFileCreationDateTime(int $position = 7)
{
return $this->getField($position);
}

public function getFileSecurity(int $position = 8)
{
return $this->getField($position);
}

public function getFileNameId(int $position = 9)
{
return $this->getField($position);
}

public function getFileHeaderComment(int $position = 10)
{
return $this->getField($position);
}

public function getFileControlId(int $position = 11)
{
return $this->getField($position);
}

public function getReferenceFileControlId(int $position = 12)
{
return $this->getField($position);
}

}
40 changes: 40 additions & 0 deletions src/HL7/Segments/FTS.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

namespace Aranyasen\HL7\Segments;

use Aranyasen\HL7\Segment;

/**
* FTS: File Trailer Segment
* Ref: https://hl7-definition.caristix.com/v2/HL7v2.3/Segments/FTS
*/
class FTS extends Segment
{
public function __construct(array $fields = null)
{
parent::__construct('FTS', $fields);
}

public function setFileBatchCount($value, int $position = 1)
{
return $this->setField($position, $value);
}

public function setFileTrailerComment($value, int $position = 2)
{
return $this->setField($position, $value);
}

// -------------------- Getter Methods ------------------------------

public function getFileBatchCount(int $position = 1)
{
return $this->getField($position);
}

public function getFileTrailerComment(int $position = 2)
{
return $this->getField($position);
}

}

0 comments on commit 95e96b6

Please sign in to comment.