<?php
namespace MedBrief\MSR\Entity\Embeddable;
use Doctrine\ORM\Mapping as ORM;
use MedBrief\MSR\Entity\RecordsRequest;
/**
* Embeddable object that holds information about received records.
*
* @ORM\Embeddable
*/
class RecordsReceived
{
// format constants
public const FORMAT_HARD_COPY = 0;
public const FORMAT_ELECTRONIC = 1;
public const FORMAT_MIXTURE = 2;
/**
* @var int|null
*
* @ORM\Column(name="format", type="integer", nullable=true)
*/
protected $format;
/**
* Set format
*
* @param int $format
*
* @return RecordsRequest
*/
public function setFormat($format)
{
$this->format = $format;
return $this;
}
/**
* Get format
*
* @return int
*/
public function getFormat()
{
return $this->format;
}
/**
* Get formatOptions
*
* @return array
*/
public static function getFormatOptions()
{
return [
self::FORMAT_HARD_COPY => 'Hard Copy',
self::FORMAT_ELECTRONIC => 'Electronic',
self::FORMAT_MIXTURE => 'Mixture',
];
}
/**
* Get formatLabel
*
* @return int
*/
public function getFormatLabel()
{
$options = self::getFormatOptions();
return $options[$this->getFormat()] ?? '';
}
}