src/Globals/ClaimManagementBundle/Entity/Claim.php line 23

Open in your IDE?
  1. <?php
  2. namespace Globals\ClaimManagementBundle\Entity;
  3. use Globals\CustomerManagementBundle\Entity\Customer;
  4. use Globals\CustomerManagementBundle\Entity\Disbursement;
  5. use Globals\InvoiceManagementBundle\Entity\Invoice;
  6. use Globals\ResourceManagementBundle\Entity\Counties;
  7. use Globals\ResourceManagementBundle\Entity\Resource;
  8. use Doctrine\Common\Collections\ArrayCollection;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use Globals\ResourceManagementBundle\Entity\State;
  11. use Globals\CoreBundle\Services\GoogleGeocoder;
  12. use Symfony\Component\Validator\Constraints as Assert;
  13. /**
  14.  * Claim
  15.  *
  16.  * @ORM\Table(name="claim")
  17.  * @ORM\Entity(repositoryClass="Globals\ClaimManagementBundle\Repository\ClaimRepository")
  18.  * @ORM\HasLifecycleCallbacks()
  19.  */
  20. class Claim
  21. {
  22.     /**
  23.      * @var int
  24.      *
  25.      * @ORM\Column(name="id", type="integer")
  26.      * @ORM\Id
  27.      * @ORM\GeneratedValue(strategy="AUTO")
  28.      */
  29.     private $id;
  30.     /**
  31.      * @var string
  32.      *
  33.      * @ORM\Column(name="claim_number", type="string", length=255)
  34.      */
  35.     private $claimNumber;
  36.     /**
  37.      * @var string
  38.      *
  39.      * @ORM\Column(name="insurer_code", type="string", length=255)
  40.      */
  41.     private $insurerCode;
  42.     /**
  43.      * @var string
  44.      *
  45.      * @ORM\Column(name="client_email", type="string", length=255)
  46.      */
  47.     private $clientEmail;
  48.     /**
  49.      * @var string
  50.      *
  51.      * @ORM\Column(name="insurer_address", type="string", length=255)
  52.      */
  53.     private $insurerAddress;
  54.     /**
  55.      * @var string
  56.      *
  57.      * @ORM\Column(name="insurer_name", type="string", length=255)
  58.      */
  59.     private $insurerName;
  60.     /**
  61.      * @var string
  62.      *
  63.      * @ORM\Column(name="insurer_group", type="string", length=255)
  64.      */
  65.     private $insurerGroup;
  66.     /**
  67.      * @var int
  68.      *
  69.      * @ORM\Column(name="file_no", type="integer")
  70.      */
  71.     private $fileNumber;
  72.     /**
  73.      * @var \DateTime
  74.      *
  75.      * @ORM\Column(name="report_due_date", type="datetime", nullable=true)
  76.      */
  77.     private $reportDueDate;
  78.     /**
  79.      * @var int
  80.      *
  81.      * @ORM\Column(name="year_built", type="integer")
  82.      */
  83.     private $yearBuilt 0;
  84.     /**
  85.      * @var string
  86.      *
  87.      * @ORM\Column(name="policy_number", type="string", length=255)
  88.      *
  89.      */
  90.     private $policyNumber "";
  91.     /**
  92.      * @var \DateTime
  93.      *
  94.      * @ORM\Column(name="policy_start_date", type="datetime", nullable=true)
  95.      *
  96.      */
  97.     private $policyStartDate;
  98.     /**
  99.      * @var \DateTime
  100.      *
  101.      * @ORM\Column(name="policy_end_date", type="datetime", nullable=true)
  102.      *
  103.      */
  104.     private $policyEndDate;
  105.     /**
  106.      * @ORM\Column(name="policy_limit", type="float")
  107.      */
  108.     private $policyLimit 0;
  109.     /**
  110.      * @var string
  111.      *
  112.      * @ORM\Column(name="loss_street", type="text")
  113.      */
  114.     private $lossStreet "";
  115.     /**
  116.      * @var string
  117.      *
  118.      * @ORM\Column(name="loss_city", type="string", length=255)
  119.      */
  120.     private $lossCity "";
  121.     /**
  122.      * @var State
  123.      *
  124.      * @ORM\ManyToOne(targetEntity="Globals\ResourceManagementBundle\Entity\State")
  125.      */
  126.     private $lossState null;
  127.     /**
  128.      * @var Counties
  129.      *
  130.      * @ORM\ManyToOne(targetEntity="Globals\ResourceManagementBundle\Entity\Counties")
  131.      */
  132.     private $lossCounty null;
  133.     /**
  134.      * @var string
  135.      *
  136.      * @ORM\Column(name="loss_zip", type="string", length=255)
  137.      */
  138.     private $lossZip "";
  139.     /**
  140.      * @var \DateTime
  141.      *
  142.      * @ORM\Column(name="loss_date", type="datetime", nullable=true)
  143.      * @Assert\LessThanOrEqual(value ="now", message="This value should be less than or equal to today")
  144.      */
  145.     private $lossDate;
  146.     /**
  147.      * @var string
  148.      *
  149.      * @ORM\Column(name="loss_notes", type="text")
  150.      */
  151.     private $lossNotes "";
  152.     /**
  153.      * @var string
  154.      *
  155.      * @ORM\Column(name="loss_description", type="text")
  156.      */
  157.     private $lossDescription "";
  158.     /**
  159.      * @var float
  160.      *
  161.      * @ORM\Column(name="loss_amount", type="float")
  162.      */
  163.     private $lossAmount 0.0;
  164.     /**
  165.      * @var \DateTime
  166.      *
  167.      * @ORM\Column(name="first_loss_notice", type="datetime", nullable=true)
  168.      *
  169.      */
  170.     private $firstLossNotice;
  171.     /**
  172.      * @var string
  173.      *
  174.      * @ORM\Column(name="catastrophe_code", type="string", length=255, nullable=true)
  175.      */
  176.     private $catastropheCode "";
  177.     /**
  178.      * @var int
  179.      *
  180.      * @ORM\Column(name="severity", type="smallint")
  181.      */
  182.     private $severity 0;
  183.     /**
  184.      * @var \DateTime
  185.      *
  186.      * @ORM\Column(name="date_received", type="datetime", nullable=true)
  187.      */
  188.     private $dateReceived;
  189.     /**
  190.      * @var \DateTime
  191.      *
  192.      * @ORM\Column(name="date_created", type="datetime", nullable=true)
  193.      */
  194.     private $dateCreated;
  195.     /**
  196.      * @var \DateTime
  197.      *
  198.      * @ORM\Column(name="date_opened", type="datetime", nullable=true)
  199.      */
  200.     private $dateOpened;
  201.     /**
  202.      * @var \DateTime
  203.      *
  204.      * @ORM\Column(name="date_contacted", type="datetime", nullable=true)
  205.      */
  206.     private $dateContacted;
  207.     /**
  208.      * @var \DateTime
  209.      *
  210.      * @ORM\Column(name="planned_inspection_date", type="datetime", nullable=true)
  211.      */
  212.     private $plannedInspectionDate;
  213.     /**
  214.      * @var integer
  215.      *
  216.      * @ORM\Column(name="report_to_id", type="integer", nullable=true)
  217.      */
  218.     private $reportToId;
  219.     /**
  220.      * @var \DateTime
  221.      *
  222.      * @ORM\Column(name="date_inspected", type="datetime", nullable=true)
  223.      */
  224.     private $dateInspected;
  225.     /**
  226.      * @var \DateTime
  227.      *
  228.      * @ORM\Column(name="date_review_ready", type="datetime", nullable=true)
  229.      */
  230.     private $dateReviewReady;
  231.     /**
  232.      * @var \DateTime
  233.      *
  234.      * @ORM\Column(name="date_invoice_ready", type="datetime", nullable=true)
  235.      */
  236.     private $dateInvoiceReady;
  237.     /**
  238.      * @var \DateTime
  239.      *
  240.      * @ORM\Column(name="date_closed", type="datetime", nullable=true)
  241.      */
  242.     private $dateClosed;
  243.     /**
  244.      * @var \DateTime
  245.      *
  246.      * @ORM\Column(name="date_reopened", type="datetime", nullable=true)
  247.      */
  248.     private $dateReopened;
  249.     /**
  250.      * @var \DateTime
  251.      *
  252.      * @ORM\Column(name="date_rejected", type="datetime", nullable=true)
  253.      */
  254.     private $dateRejected;
  255.     /**
  256.      * @var bool
  257.      *
  258.      * @ORM\Column(name="needs_inspection", type="boolean")
  259.      */
  260.     private $needsInspection true;
  261.     /**
  262.      * @var bool
  263.      *
  264.      * @ORM\Column(name="needs_atty_rep", type="boolean")
  265.      */
  266.     // private $needsAttyRep = false;
  267.     /**
  268.      * @var bool
  269.      *
  270.      * @ORM\Column(name="needs_public_adj", type="boolean")
  271.      */
  272.     // private $needsPublicAdj = false;
  273.     /**
  274.      * @var bool
  275.      *
  276.      * @ORM\Column(name="needs_third_party", type="boolean")
  277.      */
  278.     private $needsThirdParty false;
  279.     /**
  280.      * @var bool
  281.      *
  282.      * @ORM\Column(name="is_locked", type="boolean")
  283.      */
  284.     private $isLocked 0;
  285.     /**
  286.      * @var integer
  287.      *
  288.      * @ORM\Column(name="is_cat", type="boolean")
  289.      */
  290.     private $isCat 0;
  291.     /**
  292.      * @var integer
  293.      *
  294.      * @ORM\Column(name="is_pha", type="boolean")
  295.      */
  296.     // private $isPha = 0;
  297.     /**
  298.      * @var string
  299.      *
  300.      * @ORM\Column(name="xact_error_message", type="string", length=255)
  301.      */
  302.       private $xactErrorMessage "";
  303.     /**
  304.      * @var string
  305.      *
  306.      * @ORM\Column(name="xact_error_code", type="string", length=255)
  307.      */
  308.       private $xactErrorCode "";
  309.     /**
  310.      * @var string
  311.      *
  312.      * @ORM\Column(name="form_numbers", type="text")
  313.      */
  314.     private $formNumbers "";
  315.     /**
  316.      * @var string
  317.      *
  318.      * @ORM\Column(name="form_numbers_set", type="text")
  319.      */
  320.     private $formNumbersSet "";
  321.     /**
  322.      * @var string
  323.      *
  324.      * @ORM\Column(name="mortgage", type="string", length=255)
  325.      */
  326.     private $mortgage "";
  327.     /**
  328.      * @var string
  329.      *
  330.      * @ORM\Column(name="coinsurance", type="string", length=255)
  331.      */
  332.     private $coinsurance "";
  333.     /**
  334.      * @var string
  335.      *
  336.      * @ORM\Column(name="loan_number", type="string", length=64)
  337.      */
  338.     private $loanNumber "";
  339.     /**
  340.      * @var string
  341.      *
  342.      * @ORM\Column(name="settlement_type", type="string", length=255)
  343.      */
  344.     private $settlementType "";
  345.     /**
  346.      * @var string
  347.      *
  348.      * @ORM\Column(name="special_notes", type="text")
  349.      */
  350.     private $specialNotes "";
  351.     /**
  352.      * @var string
  353.      *
  354.      * @ORM\Column(name="policy_type", type="string", length=255)
  355.      */
  356.     private $policyType "";
  357.     /**
  358.      * @var PropertyStatus
  359.      *
  360.      * @ORM\ManyToOne(targetEntity="PropertyStatus")
  361.      */
  362.     private $propertyStatus;
  363.     /**
  364.      * @var ClaimExceptions
  365.      *
  366.      * @ORM\ManyToOne(targetEntity="ClaimExceptions")
  367.      */
  368.     private $claimExceptions;
  369.     /**
  370.      * @var Customer
  371.      *
  372.      * @ORM\ManyToOne(targetEntity="Globals\CustomerManagementBundle\Entity\Customer", inversedBy="claims")
  373.      * @ORM\JoinColumn(nullable=true)
  374.      */
  375.     private $customer;
  376.     /**
  377.      * @var integer
  378.      *
  379.      * @ORM\Column(name="status_id", type="integer")
  380.      */
  381.     private $status;
  382.     /**
  383.      * @var \DateTime
  384.      *
  385.      * @ORM\Column(name="minor_bday", type="datetime", nullable=true)
  386.      */
  387.     private $minorBday null;
  388.     /**
  389.      * @var ClaimStatus
  390.      *
  391.      * @ORM\Column(name="sub_status_id", type="integer")
  392.      */
  393.     private $subStatusId 0;
  394.     /**
  395.      * @var SettlementType
  396.      *
  397.      * @ORM\ManyToOne(targetEntity="Globals\ClaimManagementBundle\Entity\SettlementType")
  398.      */
  399.     private $settlement;
  400.     /**
  401.      * @var PolicyType
  402.      *
  403.      * @ORM\ManyToOne(targetEntity="Globals\ClaimManagementBundle\Entity\PolicyType")
  404.      */
  405.     private $policy;
  406.     /**
  407.      * @var ArrayCollection|LossLocation[]
  408.      *
  409.      * @ORM\OneToMany(targetEntity="Globals\ClaimManagementBundle\Entity\LossLocation", mappedBy="claim", cascade={"persist"})
  410.      */
  411.     private $lossLocations;
  412.     /**
  413.      * @var ArrayCollection|Reserve[]
  414.      *
  415.      * @ORM\OneToMany(targetEntity="Globals\ClaimManagementBundle\Entity\Reserve", mappedBy="claim", cascade={"persist"})
  416.      */
  417.     private $reserves;
  418.     /**
  419.      * @var ArrayCollection|Coverage[]
  420.      *
  421.      * @ORM\OneToMany(targetEntity="Globals\ClaimManagementBundle\Entity\Coverage", mappedBy="claim", cascade={"all"})
  422.      */
  423.     private $coverages;
  424.     /**
  425.      * @var ArrayCollection|Deductible[]
  426.      *
  427.      * @ORM\OneToMany(targetEntity="Globals\ClaimManagementBundle\Entity\Deductible", mappedBy="claim", cascade={"all"})
  428.      */
  429.     private $deductibles;
  430.     /**
  431.      * @var ArrayCollection|ClaimResource[]
  432.      *
  433.      * @ORM\OneToMany(targetEntity="Globals\ClaimManagementBundle\Entity\Assignments", mappedBy="claim")
  434.      */
  435.     private $resources;
  436.     /**
  437.      * @var ArrayCollection|ClaimResourcePrevious[]
  438.      *
  439.      * @ORM\OneToMany(targetEntity="Globals\ClaimManagementBundle\Entity\ClaimResourcePrevious", mappedBy="claim")
  440.      */
  441.     private $previousResources;
  442.     /**
  443.      * @var ArrayCollection|ClaimNote[]
  444.      *
  445.      * @ORM\OneToMany(targetEntity="Globals\ClaimManagementBundle\Entity\ClaimNote", mappedBy="claim")
  446.      * @ORM\OrderBy({"commentOn" = "DESC", "id" = "DESC"})
  447.      */
  448.     private $notes;
  449.     /**
  450.      * @var ArrayCollection|Disbursement[]
  451.      *
  452.      * @ORM\OneToMany(targetEntity="Globals\CustomerManagementBundle\Entity\Disbursement", mappedBy="claim")
  453.      */
  454.     private $disbursements;
  455.     /**
  456.      * @ORM\OneToMany(targetEntity="Globals\ClaimManagementBundle\Entity\ClaimsInsured", mappedBy="claim", cascade={"persist"})
  457.      */
  458.     private $claimsInsureds;
  459.     /**
  460.      * @ORM\OneToMany(targetEntity="Globals\ClaimManagementBundle\Entity\ClaimsOtherParty", mappedBy="claim", cascade={"persist"})
  461.      */
  462.     private $claimsOtherParty;
  463.     /**
  464.      * @ORM\OneToMany(targetEntity="Globals\ClaimManagementBundle\Entity\ClaimPeril", mappedBy="claim")
  465.      */
  466.     private $claimPerils;
  467.     /**
  468.      * @ORM\OneToMany(targetEntity="Globals\InvoiceManagementBundle\Entity\Invoice", mappedBy="claim")
  469.      */
  470.     private $invoices;
  471.     /**
  472.      * @var ArrayCollection|DuplicateClaim[]
  473.      *
  474.      * @ORM\OneToMany(targetEntity="Globals\ClaimManagementBundle\Entity\DuplicateClaim", mappedBy="claim", cascade={"persist"})
  475.      */
  476.     private $duplicateClaims;
  477.     /**
  478.      * @ORM\Column(type="integer")
  479.      */
  480.     private $adminFeeCharged 0;
  481.     /**
  482.      * @ORM\ManyToOne(targetEntity="ClaimTeam")
  483.      * @ORM\JoinColumn(name="claim_team_id", referencedColumnName="id")
  484.      */
  485.     private $claimTeam;
  486.     /**
  487.      * @var PlanID
  488.      * @ORM\ManyToOne(targetEntity="Globals\ClaimManagementBundle\Entity\PlanID")
  489.      */
  490.     private $planId null;
  491.     /**
  492.      * @ORM\Column(name="transaction_id", type="string")
  493.      *
  494.      */
  495.     private $transactionId "";
  496.     /**
  497.      * @ORM\Column(name="has_claimant_involved", type="boolean", nullable=true)
  498.      *
  499.      */
  500.     private $hasClaimantInvolved false;
  501.     /**
  502.      * @ORM\Column(name="has_attorney_handling", type="boolean", nullable=true)
  503.      */
  504.     // private $isAttyHandling = false;
  505.     /**
  506.      * @ORM\ManyToOne(targetEntity="Globals\ClaimManagementBundle\Entity\Peril")
  507.      * @ORM\JoinColumn(name="peril_id", referencedColumnName="id")
  508.      */
  509.     private $peril;
  510.     /**
  511.      * @ORM\ManyToOne(targetEntity="Globals\ClaimManagementBundle\Entity\Peril")
  512.      * @ORM\JoinColumn(name="sub_peril_id", referencedColumnName="id",nullable=true)
  513.      */
  514.     private $subPeril null;
  515.     /**
  516.      * @ORM\Column(name="assignment_date", type="datetime")
  517.      */
  518.     private $assignmentDate;
  519.     /**
  520.      * @ORM\Column(name="inspection_note", type="string", length=255)
  521.      */
  522.     private $inspectionNote "";
  523.     /**
  524.      * @ORM\Column(name="mortgage_bank", type="string")
  525.      */
  526.     private $mortgageBank "";
  527.     /**
  528.      * @var Resource
  529.      *
  530.      * @ORM\ManyToOne(targetEntity="Globals\ResourceManagementBundle\Entity\Resource")
  531.      */
  532.     private $claimRep;
  533.     /**
  534.      * @var string
  535.      *
  536.      * @ORM\Column(name="claim_branch_code", type="text")
  537.      */
  538.     private $claimBranchCode;
  539.     /**
  540.      * @var string
  541.      *
  542.      * @ORM\Column(name="assignee_display", type="text")
  543.      */
  544.     private $assigneeDisplay;
  545.     /**
  546.      * @var string
  547.      *
  548.      * @ORM\Column(name="prior_loss_info", type="text")
  549.      */
  550.     private $priorLossInfo;
  551.     /*
  552.      * Added 01/20/2020
  553.      *
  554.      * Part of TASK-BASED CO-ASSIGNMENT
  555.      *
  556.      */
  557.     /**
  558.      * @var Claim
  559.      *
  560.      * @ORM\ManyToOne(targetEntity="Globals\ClaimManagementBundle\Entity\Claim")
  561.      */
  562.     private $parentTask;
  563.     /**
  564.      * @var int
  565.      *
  566.      * @ORM\Column(name="sub_task_index", type="integer")
  567.      */
  568.     private $subTaskIndex 0;
  569.     /**
  570.      * @ORM\Column(name="sent_to_api", type="string")
  571.      */
  572.     private $sentToApi;
  573.     /**
  574.      * @var string
  575.      *
  576.      * @ORM\Column(name="reopen_denial_description_line", type="string", length=60)
  577.      */
  578.     private $reopenDenialDescriptionLine;
  579.     /*
  580.      * _--==--_--==--_--==--_--==--_--==--_--==--_--==--_--==--_--==--_--==--_--==--_--==--_--==--_--==--_--==--_--==--_
  581.      */
  582.     /**
  583.      * @var bool
  584.      *
  585.      * @ORM\Column(name="is_casualty_claim", type="boolean")
  586.      */
  587.     private $isCasualtyClaim false;
  588.     /**
  589.      * @return bool
  590.      */
  591.     public function isCasualtyClaim()
  592.     {
  593.         return $this->isCasualtyClaim;
  594.     }
  595.     /**
  596.      * @param bool $isCasualtyClaim
  597.      */
  598.     public function setIsCasualtyClaim($isCasualtyClaim)
  599.     {
  600.         $this->isCasualtyClaim $isCasualtyClaim;
  601.     }
  602.     /**
  603.      * @var array
  604.      */
  605.     static private $status_colors = [
  606.         => "E04541",
  607.         10 => "FF0000",
  608.         12 => "3C3AAD",
  609.         13 => "62219B",
  610.         14 => "543904",
  611.         15 => "397FD3",
  612.         20 => "551a8b",
  613.         23 => "A5AF34",
  614.         25 => "0000ff",
  615.         30 => "333338"
  616.     ];
  617.     /**
  618.      * @var array
  619.      */
  620.     private $colors = [
  621.         => "E04541",
  622.         10 => "FF0000",
  623.         12 => "3C3AAD",
  624.         13 => "62219B",
  625.         14 => "543904",
  626.         15 => "397FD3",
  627.         20 => "551a8b",
  628.         23 => "32cd32",
  629.         25 => "0000ff",
  630.         30 => "333338"
  631.     ];
  632.     /**
  633.      * @var array
  634.      */
  635.     static private $status_names = [
  636.         => "Unassigned",
  637.         10 => "First Contact",
  638.         12 => "Re-Inspection",
  639.         13 => "Re-Opened",
  640.         14 => "File Rejection",
  641.         15 => "In Progress",
  642.         20 => "Ready for Review",
  643.         23 => "In Progress - Examiner",
  644.         25 => "Ready for Invoice",
  645.         30 => "Closed",
  646.         => "Deferred Assignment",
  647.         97 => "Claim Tech closing",
  648.         98 => "Pending examiner",
  649.         99 => "In progress - Claim tech",
  650.         100 => "DA Review",
  651.         101 => "Final Report Due",
  652.         103 => "Status Report Uploaded",
  653.         106 => "Ready to invoice TPA"
  654.     ];
  655.     /**
  656.      * @var array
  657.      */
  658.     private $names = [
  659.         => "Unassigned",
  660.         => "Unassigned",
  661.         10 => "First Contact",
  662.         12 => "Re-Inspection",
  663.         13 => "Re-Opened",
  664.         14 => "Returned Files",
  665.         15 => "In Progress",
  666.         20 => "Ready for Review",
  667.         23 => "In Progress - Examiner",
  668.         25 => "Ready for Invoice",
  669.         30 => "Closed",
  670.         66 => "Draft",
  671.         97 => "Claim Tech closing",
  672.         98 => "Pending examiner",
  673.         99 => "In progress - Claim tech",
  674.         100 => "DA Review",
  675.         101 => "Final Report Due",
  676.         103 => "Status Report Uploaded",
  677.         106 => "Ready to invoice TPA"
  678.     ];
  679.     /**
  680.      * FIELDS ADDED FOR BORDERAUX REPORT
  681.      * 8/2018
  682.      * ==============================================================
  683.      */
  684.     /**
  685.      * @var string
  686.      *
  687.      * @ORM\Column(name="mast_pol", type="text")
  688.      */
  689.     private $mastPol;
  690.     /**
  691.      * @var \DateTime
  692.      *
  693.      * @ORM\Column(name="mast_pol_start", type="datetime", nullable=true)
  694.      */
  695.     private $mastPolStart;
  696.     /**
  697.      * @var \DateTime
  698.      *
  699.      * @ORM\Column(name="mast_pol_end", type="datetime", nullable=true)
  700.      */
  701.     private $mastPolEnd;
  702.     /**
  703.      * @var bool
  704.      *
  705.      * @ORM\Column(name="referred", type="boolean")
  706.      */
  707.     private $referred false;
  708.     /**
  709.      * @var PropertyType
  710.      *
  711.      * @ORM\ManyToOne(targetEntity="Globals\ClaimManagementBundle\Entity\PropertyType")
  712.      */
  713.     private $propertyType;
  714.     /**
  715.      * @var string
  716.      *
  717.      * @ORM\Column(name="umr", type="string")
  718.      */
  719.     private $umr;
  720.     /**
  721.      * @var bool
  722.      *
  723.      * @ORM\Column(name="denial", type="boolean")
  724.      */
  725.     private $denial false;
  726.     /**
  727.      * @var ClaimType
  728.      *
  729.      * @ORM\ManyToOne(targetEntity="Globals\ResourceManagementBundle\Entity\Resource")
  730.      * @ORM\JoinColumn(name="reviewer_id", referencedColumnName="id")
  731.      */
  732.     private $reviewer;
  733.     /**
  734.      * @var ClaimAgent
  735.      *
  736.      * @ORM\ManyToOne(targetEntity="Globals\ClaimManagementBundle\Entity\ClaimAgent")
  737.      */
  738.     private $agent;
  739.     /**
  740.      * @var ClaimType
  741.      *
  742.      * @ORM\ManyToOne(targetEntity="Globals\ClaimManagementBundle\Entity\ClaimType")
  743.      */
  744.     private $claimType;
  745.     /**
  746.      * @var ArrayCollection|ClaimLimit
  747.      *
  748.      * @ORM\OneToMany(targetEntity="Globals\ClaimManagementBundle\Entity\ClaimLimit", mappedBy="claim")
  749.      */
  750.     private $claimLimits;
  751.     /**
  752.      * @var integer
  753.      *
  754.      * @ORM\Column(name="report_pdf_stacking", type="integer")
  755.      */
  756.     private $reportPDFStacking;
  757.     /**
  758.      * @var integer
  759.      *
  760.      * @ORM\Column(name="parent", type="integer")
  761.      */
  762.     private $parent 0;
  763.     /**
  764.      * @var string
  765.      *
  766.      * @ORM\Column(name="treaty_number", type="string", nullable=true)
  767.      */
  768.     private $treatyNumber 0;
  769.     /**
  770.      * @var string
  771.      *
  772.      * @ORM\Column(name="sub_treaty_number", type="string", nullable=true)
  773.      */
  774.     private $subTreatyNumber 0;
  775.     /**
  776.      * @var string
  777.      *
  778.      * @ORM\Column(name="assignment_id", type="string", nullable=true)
  779.      */
  780.     private $assignmentId;
  781.     /**
  782.      * @var Resource
  783.      *
  784.      * @ORM\ManyToOne(targetEntity="Globals\ResourceManagementBundle\Entity\Resource")
  785.      */
  786.     private $assistiveResource;
  787.     /**
  788.      * @var string
  789.      *
  790.      * @ORM\Column(name="agency_number", type="string", length=2)
  791.      */
  792.     private $agencyNumber;
  793.     /**
  794.      * @var string
  795.      *
  796.      * @ORM\Column(name="adjusting_firm_claim_number", type="string", length=15)
  797.      */
  798.     private $adjustingFirmClaimNumber;
  799.     /**
  800.      * @var string
  801.      *
  802.      * @ORM\Column(name="loss_latitude", type="string", length=115)
  803.      */
  804.     private $lossLatitude;
  805.     /**
  806.      * @var string
  807.      *
  808.      * @ORM\Column(name="loss_longitude", type="string", length=115)
  809.      */
  810.     private $lossLongitude;
  811.     /**
  812.      * @var string
  813.      *
  814.      * @ORM\Column(name="denial_description_line", type="string", length=60)
  815.      */
  816.     private $denialDescriptionLine;
  817.     /**
  818.      * @var CwopReason
  819.      *
  820.      * @ORM\ManyToOne(targetEntity="Globals\ClaimManagementBundle\Entity\CwopReason")
  821.      */
  822.     private $cwopReason;
  823.     /**
  824.      * @var \DateTime
  825.      *
  826.      * @ORM\Column(name="reopen_ack_date", type="datetime", nullable=true)
  827.      */
  828.     private $reopenAckDate;
  829.     /**
  830.      * @var \DateTime
  831.      *
  832.      * @ORM\Column(name="reopen_closed_date", type="datetime", nullable=true)
  833.      */
  834.     private $reopenClosedDate;
  835.     /**
  836.      * @var SettlementType
  837.      *
  838.      * @ORM\ManyToOne(targetEntity="Globals\ClaimManagementBundle\Entity\SettlementType")
  839.      */
  840.     private $reopenSettlementType;
  841.     /**
  842.      * @var CwopReason
  843.      *
  844.      * @ORM\ManyToOne(targetEntity="Globals\ClaimManagementBundle\Entity\CwopReason")
  845.      */
  846.     private $reopenCwopRsn;
  847.     /**
  848.      * @var LineOfBusiness
  849.      *
  850.      * @ORM\ManyToOne(targetEntity="Globals\ClaimManagementBundle\Entity\LineOfBusiness")
  851.      */
  852.     private $lineOfBusiness;
  853.     /**
  854.      * @var string
  855.      *
  856.      * @ORM\Column(name="customer_cat_code", type="string", length=255)
  857.      */
  858.     private $customerCatCode "";
  859.     /**
  860.      * @var string
  861.      *
  862.      * @ORM\Column(name="liability_type", type="string", length=2)
  863.      */
  864.     private $liabilityType;
  865.     /**
  866.      * @var string
  867.      *
  868.      * @ORM\Column(name="recoveries_type", type="string", length=2)
  869.      */
  870.     private $recoveriesType;
  871.     /**
  872.      * @var string
  873.      *
  874.      * @ORM\Column(name="property_damage_type", type="string", length=2)
  875.      */
  876.     private $propertyDamageType;
  877.     /**
  878.      * @ORM\Column(name="updated_at", type="datetime", nullable=true)
  879.      */
  880.     private \DateTime $updatedAt;
  881.     /**
  882.      * @var integer
  883.      *
  884.      * @ORM\Column(name="is_claim_category", type="integer", length=1)
  885.      */
  886.     private $isClaimCategory=1;
  887.     
  888.     /**
  889.      * @var ArrayCollection|ClaimResourceExternal[]
  890.      *
  891.      * @ORM\OneToMany(targetEntity="Globals\ClaimManagementBundle\Entity\AssignmentsExternal", mappedBy="claim")
  892.      */
  893.     private $resourcesExternal;
  894.     /**
  895.      * @var ArrayCollection|AutoClaim[]
  896.      *
  897.      * @ORM\OneToOne(targetEntity="Globals\ClaimManagementBundle\Entity\AutoClaim", mappedBy="claim")
  898.      */
  899.     private $autoClaim;
  900.     /**
  901.      * @var \DateTime
  902.      *
  903.      * @ORM\Column(name="coverage_effective_date", type="datetime", nullable=true)
  904.      */
  905.     private $coverageEffectiveDate;
  906.     /**
  907.      * @var string
  908.      * @ORM\Column(name="contact", type="string", length=255, nullable=true)
  909.      */
  910.     private $contact;
  911.     /**
  912.      * @var string
  913.      * @ORM\Column(name="contact_response_phone", type="string", length=15, nullable=true)
  914.      */
  915.     private $contactResponsePhone;
  916.     /**
  917.      * @return \DateTime
  918.      */
  919.     public function getUpdatedAt(): \DateTime
  920.     {
  921.         return $this->updatedAt;
  922.     }
  923.     /**
  924.      * @param \DateTime $updatedAt
  925.      * @return $this
  926.      */
  927.     public function setUpdatedAt(\DateTime $updatedAt): self
  928.     {
  929.         $this->updatedAt $updatedAt;
  930.         return $this;
  931.     }
  932.     /**
  933.      * @ORM\PrePersist
  934.      */
  935.     public function prePersist()
  936.     {
  937.         $this->updatedAt = new \DateTime();
  938.     }
  939.     /**
  940.      * @ORM\PreUpdate()
  941.      */
  942.     public function preUpdate()
  943.     {
  944.         $this->updatedAt = new \DateTime();
  945.     }
  946.     /**
  947.      * Get id
  948.      *
  949.      * @return int
  950.      */
  951.     public function getId()
  952.     {
  953.         return $this->id;
  954.     }
  955.     /**
  956.      * @return LineOfBusiness
  957.      */
  958.     public function getLineOfBusiness()
  959.     {
  960.         return $this->lineOfBusiness;
  961.     }
  962.     /**
  963.      * @param LineOfBusiness $lineOfBusiness
  964.      */
  965.     public function setLineOfBusiness($lineOfBusiness null)
  966.     {
  967.         $this->lineOfBusiness $lineOfBusiness;
  968.     }
  969.   
  970.     /** 
  971.      * @return Claim
  972.      */
  973.     public function getParentTask()
  974.     {
  975.         return $this->parentTask;
  976.     }
  977.     /**
  978.      * @param Claim $parentTask
  979.      */
  980.     public function setParentTask($parentTask)
  981.     {
  982.         $this->parentTask $parentTask;
  983.     }
  984.     /**
  985.      * @return int
  986.      */
  987.     public function getSubTaskIndex()
  988.     {
  989.         return $this->subTaskIndex;
  990.     }
  991.     /**
  992.      * @param int $subTaskIndex
  993.      */
  994.     public function setSubTaskIndex($subTaskIndex)
  995.     {
  996.         $this->subTaskIndex $subTaskIndex;
  997.     }
  998.     /**
  999.      * @return Resource
  1000.      */
  1001.     public function getAssistiveResource()
  1002.     {
  1003.         return $this->assistiveResource;
  1004.     }
  1005.     /**
  1006.      * @param Resource $assistiveResource
  1007.      */
  1008.     public function setAssistiveResource($assistiveResource)
  1009.     {
  1010.         $this->assistiveResource $assistiveResource;
  1011.     }
  1012.     /**
  1013.      * @return string
  1014.      */
  1015.     public function getAssignmentId()
  1016.     {
  1017.         return $this->assignmentId;
  1018.     }
  1019.     /**
  1020.      * @param string $assignmentId
  1021.      */
  1022.     public function setAssignmentId($assignmentId)
  1023.     {
  1024.         $this->assignmentId $assignmentId;
  1025.     }
  1026.     /**
  1027.      * @return ClaimType
  1028.      */
  1029.     public function getClaimType()
  1030.     {
  1031.         return $this->claimType;
  1032.     }
  1033.     /**
  1034.      * @param ClaimType $claimType
  1035.      */
  1036.     public function setClaimType($claimType)
  1037.     {
  1038.         $this->claimType $claimType;
  1039.     }
  1040.     /**
  1041.      * @return boolean
  1042.      */
  1043.     public function isDenial()
  1044.     {
  1045.         return $this->denial;
  1046.     }
  1047.     /**
  1048.      * @param boolean $denial
  1049.      */
  1050.     public function setDenial($denial)
  1051.     {
  1052.         $this->denial $denial;
  1053.     }
  1054.     /**
  1055.      * @return string
  1056.      */
  1057.     public function getUmr()
  1058.     {
  1059.         return $this->umr;
  1060.     }
  1061.     /**
  1062.      * @param string $umr
  1063.      */
  1064.     public function setUmr($umr)
  1065.     {
  1066.         $this->umr $umr;
  1067.     }
  1068.     /**
  1069.      * @return PropertyType
  1070.      */
  1071.     public function getPropertyType()
  1072.     {
  1073.         return $this->propertyType;
  1074.     }
  1075.     /**
  1076.      * @param PropertyType $propertyType
  1077.      */
  1078.     public function setPropertyType($propertyType)
  1079.     {
  1080.         $this->propertyType $propertyType;
  1081.     }
  1082.     /**
  1083.      * @return boolean
  1084.      */
  1085.     public function isReferred()
  1086.     {
  1087.         return $this->referred;
  1088.     }
  1089.     /**
  1090.      * @param boolean $referred
  1091.      */
  1092.     public function setReferred($referred)
  1093.     {
  1094.         $this->referred $referred;
  1095.     }
  1096.     /**
  1097.      * @return \DateTime
  1098.      */
  1099.     public function getMastPolEnd()
  1100.     {
  1101.         return $this->mastPolEnd;
  1102.     }
  1103.     /**
  1104.      * @param \DateTime $mastPolEnd
  1105.      */
  1106.     public function setMastPolEnd($mastPolEnd)
  1107.     {
  1108.         $this->mastPolEnd $mastPolEnd;
  1109.     }
  1110.     /**
  1111.      * @return \DateTime
  1112.      */
  1113.     public function getMastPolStart()
  1114.     {
  1115.         return $this->mastPolStart;
  1116.     }
  1117.     /**
  1118.      * @param \DateTime $mastPolStart
  1119.      */
  1120.     public function setMastPolStart($mastPolStart)
  1121.     {
  1122.         $this->mastPolStart $mastPolStart;
  1123.     }
  1124.     /**
  1125.      * @return string
  1126.      */
  1127.     public function getMastPol()
  1128.     {
  1129.         return $this->mastPol;
  1130.     }
  1131.     /**
  1132.      * @param string $mastPol
  1133.      */
  1134.     public function setMastPol($mastPol)
  1135.     {
  1136.         $this->mastPol $mastPol;
  1137.     }
  1138.     /**
  1139.      * @param $prop
  1140.      *
  1141.      * Dynamic getter, very dangerous
  1142.      */
  1143.     public function getProperty($prop)
  1144.     {
  1145.         if (strpos($prop"custom_attribute") !== false) {
  1146.             if ($this->attributes) {
  1147.                 if (!empty($this->attributes->toArray())) {
  1148.                     /** @var Attribute $attr */
  1149.                     foreach ($this->attributes->toArray() as $attr) {
  1150.                         if ($attr->getAttributeType()->getSlug() == $prop) {
  1151.                             return $attr->getValue();
  1152.                         }
  1153.                     }
  1154.                 } else {
  1155.                     return null;
  1156.                 }
  1157.             }
  1158.         } elseif (isset($this->{$prop}) && $this->{$prop}) {
  1159.             // If it's an object, singlar, return getId();
  1160.             if (gettype($this->{$prop}) == "object") {
  1161.                 if ($this->{$prop} instanceof \DateTime){
  1162.                     return $this->{$prop}->format('Y-m-d H:i:s');
  1163.                 }
  1164.                 return $this->{$prop}->getId();
  1165.             } else {
  1166.                 return $this->{$prop};
  1167.             }
  1168.         } else {
  1169.             return null;
  1170.         }
  1171.         return null;
  1172.     }
  1173.     /**
  1174.      * Claim constructor.
  1175.      *
  1176.      * Set dates, collections
  1177.      */
  1178.     public function __construct()
  1179.     {
  1180.         //SETUP: RESERVES
  1181.         $this->reserves = new ArrayCollection();
  1182.         //SETUP: COVERAGES
  1183.         $this->coverages = new ArrayCollection();
  1184.         //SETUP: DEDUCTIBLES
  1185.         $this->deductibles = new ArrayCollection();
  1186.         //SETUP: DISBURSEMENTS
  1187.         $this->disbursements = new ArrayCollection();
  1188.         //SETUP: RESOURCES
  1189.         $this->resources = new ArrayCollection();
  1190.         //SETUP: RESOURCES
  1191.         $this->previousResources = new ArrayCollection();
  1192.         //SETUP: RESOURCES
  1193.         $this->resourcesExternal = new ArrayCollection();
  1194.         //SETUP: CLAIM INSUREDS
  1195.         $this->claimsInsureds = new ArrayCollection();
  1196.         //SETUP: CLAIM PERILS
  1197.         $this->claimPerils = new ArrayCollection();
  1198.         //SETUP: INVOICES
  1199.         $this->invoices = new ArrayCollection();
  1200.         //SETUP: LOSS LOCATIONS
  1201.         $this->lossLocations = new ArrayCollection();
  1202.         //SETUP: CLAIM LIMITS
  1203.         $this->claimLimits = new ArrayCollection();
  1204.         //SETUP: CLAIM OTHER TYPE
  1205.         $this->claimsOtherParty = new ArrayCollection();
  1206.         //$this->setLossDate( new \DateTime() );
  1207.         $this->setDateReceived(new \DateTime());
  1208.         $this->setDateCreated(new \DateTime());
  1209.     }
  1210.     /**
  1211.      * @param id
  1212.      * @return string
  1213.      * Returns a HEX color for the given status
  1214.      */
  1215.     public function statusColor($id)
  1216.     {
  1217.         return $this->colors[$id];
  1218.     }
  1219.     /**
  1220.      * @param $status_int
  1221.      * @return string
  1222.      */
  1223.     static public function getStatusColor($status_int)
  1224.     {
  1225.         return self::$status_colors[$status_int];
  1226.     }
  1227.     /**
  1228.      * @param $status_int
  1229.      * @return string
  1230.      */
  1231.     static public function getStatusName($status_int)
  1232.     {
  1233.         return self::$status_names[$status_int];
  1234.     }
  1235.     /**
  1236.      * @return array
  1237.      */
  1238.     static public function getStatusArray()
  1239.     {
  1240.         return self::$status_names;
  1241.     }
  1242.     /**
  1243.      * @param id
  1244.      * @return string
  1245.      * Returns a STATUS NAME for the given status
  1246.      */
  1247.     public function statusName($id)
  1248.     {
  1249.         return $this->names[$id];
  1250.     }
  1251.     /**
  1252.      * @return SettlementType
  1253.      */
  1254.     public function getSettlement()
  1255.     {
  1256.         return $this->settlement;
  1257.     }
  1258.     /**
  1259.      * @param SettlementType $settlement
  1260.      */
  1261.     public function setSettlement($settlement)
  1262.     {
  1263.         $this->settlement $settlement;
  1264.     }
  1265.     /**
  1266.      * @return \DateTime
  1267.      */
  1268.     public function getMinorBday()
  1269.     {
  1270.         return $this->minorBday;
  1271.     }
  1272.     /**
  1273.      * @param \DateTime $minorBday
  1274.      */
  1275.     public function setMinorBday($minorBday)
  1276.     {
  1277.         $this->minorBday $minorBday;
  1278.     }
  1279.     /**
  1280.      * @return PropertyStatus
  1281.      */
  1282.     public function getPropertyStatus()
  1283.     {
  1284.         return $this->propertyStatus;
  1285.     }
  1286.     /**
  1287.      * @param PropertyStatus $propertyStatus
  1288.      */
  1289.     public function setPropertyStatus($propertyStatus)
  1290.     {
  1291.         $this->propertyStatus $propertyStatus;
  1292.     }
  1293.     /**
  1294.      * @return ClaimExceptions
  1295.      */
  1296.     public function getClaimExceptions()
  1297.     {
  1298.         return $this->claimExceptions;
  1299.     }
  1300.     /**
  1301.      * @param ClaimExceptions $claimExceptions
  1302.      */
  1303.     public function setClaimExceptions($claimExceptions)
  1304.     {
  1305.         $this->claimExceptions $claimExceptions;
  1306.     }
  1307.     /**
  1308.      * @return PolicyType
  1309.      */
  1310.     public function getPolicy()
  1311.     {
  1312.         return $this->policy;
  1313.     }
  1314.     /**
  1315.      * @param PolicyType $policy
  1316.      */
  1317.     public function setPolicy($policy null)
  1318.     {
  1319.         $this->policy $policy;
  1320.     }
  1321.     /**
  1322.      * @return mixed
  1323.      */
  1324.     public function getPolicyLimit()
  1325.     {
  1326.         return $this->policyLimit;
  1327.     }
  1328.     /**
  1329.      * @param mixed $policyLimit
  1330.      */
  1331.     public function setPolicyLimit($policyLimit)
  1332.     {
  1333.         $this->policyLimit $policyLimit;
  1334.     }
  1335.     /**
  1336.      * @return Resource
  1337.      */
  1338.     public function getReviewer()
  1339.     {
  1340.         return $this->reviewer;
  1341.     }
  1342.     /**
  1343.      * @param Resource $resource
  1344.      */
  1345.     public function setReviewer(Resource $resource)
  1346.     {
  1347.         $this->reviewer $resource;
  1348.     }
  1349.     /**
  1350.      * @return Peril
  1351.      */
  1352.     public function getPeril()
  1353.     {
  1354.         return $this->peril;
  1355.     }
  1356.     /**
  1357.      * @param Peril $peril
  1358.      */
  1359.     public function setPeril(Peril $peril null)
  1360.     {
  1361.         $this->peril $peril;
  1362.     }
  1363.     /**
  1364.      * @return mixed Peril
  1365.      */
  1366.     public function getSubPeril()
  1367.     {
  1368.         return $this->subPeril;
  1369.     }
  1370.     /**
  1371.      * @param Peril $subPeril
  1372.      */
  1373.     public function setSubPeril(Peril $subPeril null)
  1374.     {
  1375.         $this->subPeril $subPeril;
  1376.     }
  1377.     /**
  1378.      * @return Customer
  1379.      */
  1380.     public function getCustomer()
  1381.     {
  1382.         if(empty($this->customer) || $this->customer->getId()==0) return null;
  1383.         return $this->customer;
  1384.     }
  1385.     /**
  1386.      * @param Customer $customer
  1387.      */
  1388.     public function setCustomer($customer)
  1389.     {
  1390.         $this->customer $customer;
  1391.     }
  1392.     /**
  1393.      * @return void
  1394.      */
  1395.     public function removeCustomer()
  1396.     {
  1397.         $this->customer null;
  1398.     }
  1399.     /**
  1400.      * @return integer
  1401.      */
  1402.     public function getStatus()
  1403.     {
  1404.         return $this->status;
  1405.     }
  1406.     /**
  1407.      * @param integer $status
  1408.      */
  1409.     public function setStatus($status)
  1410.     {
  1411.         $this->status $status;
  1412.     }
  1413.     /**
  1414.      * @return ClaimStatus
  1415.      */
  1416.     public function getSubStatus()
  1417.     {
  1418.         return $this->subStatusId;
  1419.     }
  1420.     /**
  1421.      * @param integer
  1422.      */
  1423.     public function setSubStatus($subStatus)
  1424.     {
  1425.         $this->subStatusId $subStatus;
  1426.     }
  1427.     /**
  1428.      * @param ClaimNote $i
  1429.      */
  1430.     public function addClaimNote($i)
  1431.     {
  1432.         if ($this->notes->contains($i)) {
  1433.             return;
  1434.         }
  1435.         $this->notes->add($i);
  1436.         $i->setClaim($this);
  1437.     }
  1438.     /**
  1439.      * @return array
  1440.      */
  1441.     public function getNotes()
  1442.     {
  1443.         return $this->notes->toArray();
  1444.     }
  1445.     /**
  1446.      * @param ClaimLimit $i
  1447.      */
  1448.     public function addClaimLimit(ClaimLimit $i)
  1449.     {
  1450.         if ($this->claimLimits->contains($i)) {
  1451.             return;
  1452.         }
  1453.         $this->claimLimits->add($i);
  1454.         $i->setClaim($this);
  1455.     }
  1456.     public function getClaimLimits()
  1457.     {
  1458.         return (!is_null($this->claimLimits)) ? $this->claimLimits->toArray() : [];
  1459.     }
  1460.     /**
  1461.      * @param LossLocation $i
  1462.      */
  1463.     public function addLossLocation($i)
  1464.     {
  1465.         if ($this->lossLocations->contains($i)) {
  1466.             return;
  1467.         }
  1468.         $this->lossLocations->add($i);
  1469.         $i->setClaim($this);
  1470.     }
  1471.     /**
  1472.      * @return array
  1473.      */
  1474.     public function getLossLocations()
  1475.     {
  1476.         return $this->lossLocations->toArray();
  1477.     }
  1478.     /**
  1479.      * @param Reserve $i
  1480.      */
  1481.     public function addReserve($i)
  1482.     {
  1483.         if ($this->reserves->contains($i)) {
  1484.             return;
  1485.         }
  1486.         $this->reserves->add($i);
  1487.         $i->setClaim($this);
  1488.     }
  1489.     /**
  1490.      * @param Coverage $i
  1491.      */
  1492.     public function addCoverage($i)
  1493.     {
  1494.         if ($this->coverages->contains($i)) {
  1495.             return;
  1496.         }
  1497.         $this->coverages->add($i);
  1498.         $i->setClaim($this);
  1499.     }
  1500.     /**
  1501.      * @return array
  1502.      */
  1503.     public function getResources()
  1504.     {
  1505.         $resources_array $this->resources->toArray();
  1506.         $current_resources = array();
  1507.         /** @var  Assignments $resource_array  */
  1508.         foreach($resources_array as $resource_array){
  1509.             if($resource_array->getisCurrentAssignment()) {
  1510.                 $current_resources[] = $resource_array;
  1511.             }
  1512.         }
  1513.         return $current_resources;
  1514.     }
  1515.     /**
  1516.      * @return array
  1517.      */
  1518.     public function getPreviousResources()
  1519.     {
  1520.         return $this->previousResources->toArray();
  1521.     }
  1522.     /**
  1523.      * @return array
  1524.      */
  1525.     public function getCoverages()
  1526.     {
  1527.         return $this->coverages->toArray();
  1528.     }
  1529.     /**
  1530.      * @return array
  1531.      */
  1532.     public function getDeductibles()
  1533.     {
  1534.         return $this->deductibles->toArray();
  1535.     }
  1536.     /**
  1537.      * @return array
  1538.      */
  1539.     public function getReserves()
  1540.     {
  1541.         return $this->reserves->toArray();
  1542.     }
  1543.     /**
  1544.      * @param Deductible $i
  1545.      */
  1546.     public function addDeductible($i)
  1547.     {
  1548.         if ($this->deductibles->contains($i)) {
  1549.             return;
  1550.         }
  1551.         $this->deductibles->add($i);
  1552.         $i->setClaim($this);
  1553.     }
  1554.     /**
  1555.      * @param ClaimNote $i
  1556.      */
  1557.     public function removeClaimNote($i)
  1558.     {
  1559.         if (!$this->notes->contains($i)) {
  1560.             return;
  1561.         }
  1562.         $this->notes->removeElement($i);
  1563.         $i->removeClaim();
  1564.     }
  1565.     /**
  1566.      * @param LossLocation $i
  1567.      */
  1568.     public function removeLossLocation($i)
  1569.     {
  1570.         if (!$this->lossLocations->contains($i)) {
  1571.             return;
  1572.         }
  1573.         $this->reserves->removeElement($i);
  1574.         $i->removeClaim();
  1575.     }
  1576.     /**
  1577.      * @param Reserve $i
  1578.      */
  1579.     public function removeReserve($i)
  1580.     {
  1581.         if (!$this->reserves->contains($i)) {
  1582.             return;
  1583.         }
  1584.         $this->reserves->removeElement($i);
  1585.         $i->removeClaim();
  1586.     }
  1587.     /**
  1588.      * @param Coverage $i
  1589.      */
  1590.     public function removeCoverage($i)
  1591.     {
  1592.         if (!$this->coverages->contains($i)) {
  1593.             return;
  1594.         }
  1595.         $this->coverages->removeElement($i);
  1596.         $i->removeClaim();
  1597.     }
  1598.     /**
  1599.      * @param Deductible $i
  1600.      */
  1601.     public function removeDeductible($i)
  1602.     {
  1603.         if (!$this->deductibles->contains($i)) {
  1604.             return;
  1605.         }
  1606.         $this->deductibles->removeElement($i);
  1607.         $i->removeClaim();
  1608.     }
  1609.     /**
  1610.      * @param ClaimResource $i
  1611.      */
  1612.     public function addResource($i)
  1613.     {
  1614.         if ($this->resources->contains($i)) {
  1615.             return;
  1616.         }
  1617.         $this->resources->add($i);
  1618.         $i->setClaim($this);
  1619.     }
  1620.     /**
  1621.      * @param ClaimResource $i
  1622.      */
  1623.     public function removeResource($i)
  1624.     {
  1625.         if (!$this->resources->contains($i)) {
  1626.             return;
  1627.         }
  1628.         $this->resources->removeElement($i);
  1629.         $i->removeClaim();
  1630.     }
  1631.     /**
  1632.      * @param ClaimResourcePrevious $i
  1633.      */
  1634.     public function addPreviousResource($i)
  1635.     {
  1636.         if ($this->previousResources->contains($i)) {
  1637.             return;
  1638.         }
  1639.         $this->previousResources->add($i);
  1640.         $i->setClaim($this);
  1641.     }
  1642.     /**
  1643.      * @param ClaimResourcePrevious $i
  1644.      */
  1645.     public function removePreviousResource($i)
  1646.     {
  1647.         if (!$this->previousResources->contains($i)) {
  1648.             return;
  1649.         }
  1650.         $this->previousResources->removeElement($i);
  1651.         $i->removeClaim();
  1652.     }
  1653.     /**
  1654.      * Shortcut method for marking items for review
  1655.      */
  1656.     public function markReadyForReview()
  1657.     {
  1658.         $this->dateReviewReady = new \DateTime();
  1659.     }
  1660.     /**
  1661.      * Shortcut method for marking items ready for invoice
  1662.      */
  1663.     public function markReadyForInvoice()
  1664.     {
  1665.         $this->dateInvoiceReady = new \DateTime();
  1666.     }
  1667.     /**
  1668.      * Shortcut method for marking items as 'INSPECTED'
  1669.      */
  1670.     public function markInspected()
  1671.     {
  1672.         $this->dateInspected = new \DateTime();
  1673.     }
  1674.     /**
  1675.      * Shortcut method for marking items as 'CONTACTED'
  1676.      */
  1677.     public function markContacted()
  1678.     {
  1679.         $this->dateContacted = new \DateTime();
  1680.     }
  1681.     /**
  1682.      * @return boolean
  1683.      */
  1684.     public function getIsLocked()
  1685.     {
  1686.         return $this->isLocked;
  1687.     }
  1688.     /**
  1689.      * @param boolean $isLocked
  1690.      */
  1691.     public function setIsLocked($isLocked)
  1692.     {
  1693.         $this->isLocked $isLocked;
  1694.     }
  1695.     /**
  1696.      * @return integer
  1697.      */
  1698.     public function getIsCat()
  1699.     {
  1700.         return $this->isCat;
  1701.     }
  1702.     /**
  1703.      * @param integer $boolean
  1704.      */
  1705.     public function setIsCat($boolean)
  1706.     {
  1707.         $this->isCat $boolean;
  1708.     }
  1709.     /**
  1710.      * @return string
  1711.      */
  1712.     public function getFileNumber()
  1713.     {
  1714.         return $this->fileNumber;
  1715.     }
  1716.     /**
  1717.      * @param string $fileNumber
  1718.      */
  1719.     public function setFileNumber($fileNumber)
  1720.     {
  1721.         $this->fileNumber $fileNumber;
  1722.     }
  1723.     /**
  1724.      * @return integer
  1725.      */
  1726.     /*public function getIsPha()
  1727.     {
  1728.         return $this->isPha;
  1729.     }*/
  1730.     /**
  1731.      * @param integer $boolean
  1732.      */
  1733.     /*public function setIsPha($boolean)
  1734.     {
  1735.         $this->isPha = $boolean;
  1736.     }*/
  1737.     /**
  1738.      * Set claimNumber
  1739.      *
  1740.      * @param string $claimNumber
  1741.      *
  1742.      * @return string
  1743.      */
  1744.     public function setClaimNumber($claimNumber)
  1745.     {
  1746.         $this->claimNumber $claimNumber;
  1747.         return $this;
  1748.     }
  1749.     /**
  1750.      * Get claimNumber
  1751.      *
  1752.      * @return string
  1753.      */
  1754.     public function getClaimNumber()
  1755.     {
  1756.         return $this->claimNumber;
  1757.     }
  1758.     /**
  1759.      * Set reportDueDate
  1760.      *
  1761.      * @param \DateTime $reportDueDate
  1762.      *
  1763.      * @return \DateTime
  1764.      */
  1765.     public function setReportDueDate($reportDueDate)
  1766.     {
  1767.         $this->reportDueDate $reportDueDate;
  1768.         return $this;
  1769.     }
  1770.     /**
  1771.      * Get reportDueDate
  1772.      *
  1773.      * @return \DateTime
  1774.      */
  1775.     public function getReportDueDate()
  1776.     {
  1777.         return $this->reportDueDate;
  1778.     }
  1779.     /**
  1780.      * Set yearBuilt
  1781.      *
  1782.      * @param integer $yearBuilt
  1783.      *
  1784.      * @return integer
  1785.      */
  1786.     public function setYearBuilt($yearBuilt)
  1787.     {
  1788.         $this->yearBuilt $yearBuilt;
  1789.         return $this;
  1790.     }
  1791.     /**
  1792.      * Get yearBuilt
  1793.      *
  1794.      * @return int
  1795.      */
  1796.     public function getYearBuilt()
  1797.     {
  1798.         return $this->yearBuilt;
  1799.     }
  1800.     /**
  1801.      * Set policyNumber
  1802.      *
  1803.      * @param string $policyNumber
  1804.      *
  1805.      * @return string
  1806.      */
  1807.     public function setPolicyNumber($policyNumber)
  1808.     {
  1809.         $this->policyNumber $policyNumber;
  1810.         return $this;
  1811.     }
  1812.     /**
  1813.      * Get policyNumber
  1814.      *
  1815.      * @return string
  1816.      */
  1817.     public function getPolicyNumber()
  1818.     {
  1819.         return $this->policyNumber;
  1820.     }
  1821.     /**
  1822.      * Set policyStartDate
  1823.      *
  1824.      * @param \DateTime $policyStartDate
  1825.      *
  1826.      * @return \DateTime
  1827.      */
  1828.     public function setPolicyStartDate($policyStartDate)
  1829.     {
  1830.         $this->policyStartDate $policyStartDate;
  1831.         return $this;
  1832.     }
  1833.     /**
  1834.      * Get policyStartDate
  1835.      *
  1836.      * @return \DateTime
  1837.      */
  1838.     public function getPolicyStartDate()
  1839.     {
  1840.         return $this->policyStartDate;
  1841.     }
  1842.     /**
  1843.      * Set policyEndDate
  1844.      *
  1845.      * @param \DateTime $policyEndDate
  1846.      *
  1847.      * @return \DateTime
  1848.      */
  1849.     public function setPolicyEndDate($policyEndDate)
  1850.     {
  1851.         $this->policyEndDate $policyEndDate;
  1852.         return $this;
  1853.     }
  1854.     /**
  1855.      * Get policyEndDate
  1856.      *
  1857.      * @return \DateTime
  1858.      */
  1859.     public function getPolicyEndDate()
  1860.     {
  1861.         return $this->policyEndDate;
  1862.     }
  1863.     /**
  1864.      * Set lossStreet
  1865.      *
  1866.      * @param string $lossStreet
  1867.      *
  1868.      * @return string
  1869.      */
  1870.     public function setLossStreet($lossStreet)
  1871.     {
  1872.          $this->setLossLatitude($lossStreet);
  1873.          $this->setLossLongitude($lossStreet);
  1874.         $this->lossStreet $lossStreet;
  1875.         return $this;
  1876.     }
  1877.     /**
  1878.      * Get lossStreet
  1879.      *
  1880.      * @return string
  1881.      */
  1882.     public function getLossStreet()
  1883.     {
  1884.         return $this->lossStreet;
  1885.     }
  1886.     /**
  1887.      * Set lossCity
  1888.      *
  1889.      * @param string $lossCity
  1890.      *
  1891.      * @return string
  1892.      */
  1893.     public function setLossCity($lossCity)
  1894.     {
  1895.         $this->setLossLatitude($lossCity);
  1896.         $this->setLossLongitude($lossCity);
  1897.         $this->lossCity $lossCity;
  1898.         return $this;
  1899.     }
  1900.     /**
  1901.      * Get lossCity
  1902.      *
  1903.      * @return string
  1904.      */
  1905.     public function getLossCity()
  1906.     {
  1907.         return $this->lossCity;
  1908.     }
  1909.     /**
  1910.      * @return State
  1911.      */
  1912.     public function getLossState()
  1913.     {
  1914.         return $this->lossState;
  1915.     }
  1916.     /**
  1917.      * @param State $lossState
  1918.      */
  1919.     public function setLossState($lossState)
  1920.     {
  1921.         $this->setLossLatitude($lossState);
  1922.         $this->setLossLongitude($lossState);
  1923.         $this->lossState $lossState;
  1924.     }
  1925.     /**
  1926.      * Set lossCounty
  1927.      *
  1928.      * @param Counties $lossCounty
  1929.      *
  1930.      * @return Counties
  1931.      */
  1932.     public function setLossCounty($lossCounty)
  1933.     {
  1934.         $this->setLossLatitude($lossCounty);
  1935.         $this->setLossLongitude($lossCounty);
  1936.         $this->lossCounty $lossCounty;
  1937.         return $this;
  1938.     }
  1939.     /**
  1940.      * Get lossCounty
  1941.      *
  1942.      * @return Counties
  1943.      */
  1944.     public function getLossCounty()
  1945.     {
  1946.         return $this->lossCounty;
  1947.     }
  1948.     /**
  1949.      * Set lossZip
  1950.      *
  1951.      * @param string $lossZip
  1952.      *
  1953.      * @return string
  1954.      */
  1955.     public function setLossZip($lossZip)
  1956.     {
  1957.         $this->setLossLatitude($lossZip);
  1958.         $this->setLossLongitude($lossZip);
  1959.         $this->lossZip $lossZip;
  1960.         return $this;
  1961.     }
  1962.     /**
  1963.      * Get lossZip
  1964.      *
  1965.      * @return string
  1966.      */
  1967.     public function getLossZip()
  1968.     {
  1969.         return $this->lossZip;
  1970.     }
  1971.     /**
  1972.      * Set lossDate
  1973.      *
  1974.      * @param \DateTime $lossDate
  1975.      *
  1976.      * @return \DateTime
  1977.      */
  1978.     public function setLossDate($lossDate)
  1979.     {
  1980.         $this->lossDate $lossDate;
  1981.         return $this;
  1982.     }
  1983.     /**
  1984.      * Get lossDate
  1985.      *
  1986.      * @return \DateTime
  1987.      */
  1988.     public function getLossDate()
  1989.     {
  1990.         return $this->lossDate;
  1991.     }
  1992.     /**
  1993.      * Set lossNotes
  1994.      *
  1995.      * @param string $lossNotes
  1996.      *
  1997.      * @return string
  1998.      */
  1999.     public function setLossNotes($lossNotes)
  2000.     {
  2001.         $this->lossNotes $lossNotes;
  2002.         return $this;
  2003.     }
  2004.     /**
  2005.      * Get lossNotes
  2006.      *
  2007.      * @return string
  2008.      */
  2009.     public function getLossNotes()
  2010.     {
  2011.         return $this->lossNotes;
  2012.     }
  2013.     /**
  2014.      * Set lossDescription
  2015.      *
  2016.      * @param string $lossDescription
  2017.      *
  2018.      * @return string
  2019.      */
  2020.     public function setLossDescription($lossDescription)
  2021.     {
  2022.         $this->lossDescription $lossDescription;
  2023.         return $this;
  2024.     }
  2025.     /**
  2026.      * Get lossDescription
  2027.      *
  2028.      * @return string
  2029.      */
  2030.     public function getLossDescription()
  2031.     {
  2032.         return $this->lossDescription;
  2033.     }
  2034.     /**
  2035.      * Set lossAmount
  2036.      *
  2037.      * @param float $lossAmount
  2038.      *
  2039.      * @return float
  2040.      */
  2041.     public function setLossAmount($lossAmount)
  2042.     {
  2043.         $this->lossAmount $lossAmount;
  2044.         return $this;
  2045.     }
  2046.     /**
  2047.      * Get lossAmount
  2048.      *
  2049.      * @return float
  2050.      */
  2051.     public function getLossAmount()
  2052.     {
  2053.         return $this->lossAmount;
  2054.     }
  2055.     /**
  2056.      * Set firstLossNotice
  2057.      *
  2058.      * @param \DateTime $firstLossNotice
  2059.      *
  2060.      * @return \DateTime
  2061.      */
  2062.     public function setFirstLossNotice($firstLossNotice)
  2063.     {
  2064.         $this->firstLossNotice $firstLossNotice;
  2065.         return $this;
  2066.     }
  2067.     /**
  2068.      * Get firstLossNotice
  2069.      *
  2070.      * @return \DateTime
  2071.      */
  2072.     public function getFirstLossNotice()
  2073.     {
  2074.         return $this->firstLossNotice;
  2075.     }
  2076.     /**
  2077.      * Set catastropheCode
  2078.      *
  2079.      * @param string $catastropheCode
  2080.      *
  2081.      * @return string
  2082.      */
  2083.     public function setCatastropheCode($catastropheCode)
  2084.     {
  2085.         $this->catastropheCode $catastropheCode;
  2086.         return $this;
  2087.     }
  2088.     /**
  2089.      * Get catastropheCode
  2090.      *
  2091.      * @return string
  2092.      */
  2093.     public function getCatastropheCode()
  2094.     {
  2095.         return $this->catastropheCode;
  2096.     }
  2097.     /**
  2098.      * Set dateReceived
  2099.      *
  2100.      * @param \DateTime $dateReceived
  2101.      *
  2102.      * @return \DateTime
  2103.      */
  2104.     public function setDateReceived($dateReceived)
  2105.     {
  2106.         $this->dateReceived $dateReceived;
  2107.         return $this;
  2108.     }
  2109.     /**
  2110.      * Get dateReceived
  2111.      *
  2112.      * @return \DateTime
  2113.      */
  2114.     public function getDateReceived()
  2115.     {
  2116.         return $this->dateReceived;
  2117.     }
  2118.     /**
  2119.      * Set severity
  2120.      *
  2121.      * @param integer $severity
  2122.      *
  2123.      * @return integer
  2124.      */
  2125.     public function setSeverity($severity)
  2126.     {
  2127.         $this->severity $severity;
  2128.         return $this;
  2129.     }
  2130.     /**
  2131.      * Get severity
  2132.      *
  2133.      * @return int
  2134.      */
  2135.     public function getSeverity()
  2136.     {
  2137.         return $this->severity;
  2138.     }
  2139.     /**
  2140.      * Set loanNumber
  2141.      *
  2142.      * @param string $loanNumber
  2143.      *
  2144.      * @return string
  2145.      */
  2146.     public function setLoanNumber($loanNumber)
  2147.     {
  2148.         $this->loanNumber $loanNumber;
  2149.         return $this;
  2150.     }
  2151.     /**
  2152.      * Get loanNumber
  2153.      *
  2154.      * @return string
  2155.      */
  2156.     public function getLoanNumber()
  2157.     {
  2158.         return $this->loanNumber;
  2159.     }
  2160.     /**
  2161.      * Set dateCreated
  2162.      *
  2163.      * @param \DateTime $dateCreated
  2164.      *
  2165.      * @return \DateTime
  2166.      */
  2167.     public function setDateCreated($dateCreated)
  2168.     {
  2169.         $this->dateCreated $dateCreated;
  2170.         return $this;
  2171.     }
  2172.     /**
  2173.      * Get dateCreated
  2174.      *
  2175.      * @return \DateTime
  2176.      */
  2177.     public function getDateCreated()
  2178.     {
  2179.         return $this->dateCreated;
  2180.     }
  2181.     /**
  2182.      * Set dateOpened
  2183.      *
  2184.      * @param \DateTime $dateOpened
  2185.      *
  2186.      * @return \DateTime
  2187.      */
  2188.     public function setDateOpened($dateOpened)
  2189.     {
  2190.         $this->dateOpened $dateOpened;
  2191.         return $this;
  2192.     }
  2193.     /**
  2194.      * Get dateOpened
  2195.      *
  2196.      * @return \DateTime
  2197.      */
  2198.     public function getDateOpened()
  2199.     {
  2200.         return $this->dateOpened;
  2201.     }
  2202.     /**
  2203.      * Set dateContacted
  2204.      *
  2205.      * @param \DateTime $dateContacted
  2206.      *
  2207.      * @return \DateTime
  2208.      */
  2209.     public function setDateContacted($dateContacted)
  2210.     {
  2211.         $this->dateContacted $dateContacted;
  2212.         return $this;
  2213.     }
  2214.     /**
  2215.      * Get dateContacted
  2216.      *
  2217.      * @return \DateTime
  2218.      */
  2219.     public function getDateContacted()
  2220.     {
  2221.         return $this->dateContacted;
  2222.     }
  2223.     /**
  2224.      * Set plannedInspectionDate
  2225.      *
  2226.      * @param \DateTime $plannedInspectionDate
  2227.      *
  2228.      * @return \DateTime
  2229.      */
  2230.     public function setPlannedInspectionDate($plannedInspectionDate)
  2231.     {
  2232.         $this->plannedInspectionDate $plannedInspectionDate;
  2233.         return $this;
  2234.     }
  2235.     /**
  2236.      * Get plannedInspectionDate
  2237.      *
  2238.      * @return \DateTime
  2239.      */
  2240.     public function getPlannedInspectionDate()
  2241.     {
  2242.         return $this->plannedInspectionDate;
  2243.     }
  2244.     /**
  2245.      * Set reportToId
  2246.      *
  2247.      * @param integer $reportToId
  2248.      *
  2249.      * @return integer
  2250.      */
  2251.     public function setReportToId($reportToId)
  2252.     {
  2253.         $this->reportToId $reportToId;
  2254.         return $this;
  2255.     }
  2256.     /**
  2257.      * Get reportToId
  2258.      *
  2259.      * @return integer
  2260.      */
  2261.     public function getReportToId()
  2262.     {
  2263.         return $this->reportToId;
  2264.     }
  2265.     /**
  2266.      * Set dateInspected
  2267.      *
  2268.      * @param \DateTime $dateInspected
  2269.      *
  2270.      * @return \DateTime
  2271.      */
  2272.     public function setDateInspected($dateInspected)
  2273.     {
  2274.         $this->dateInspected $dateInspected;
  2275.         return $this;
  2276.     }
  2277.     /**
  2278.      * Get dateInspected
  2279.      *
  2280.      * @return \DateTime
  2281.      */
  2282.     public function getDateInspected()
  2283.     {
  2284.         return $this->dateInspected;
  2285.     }
  2286.     /**
  2287.      * Set dateReviewReady
  2288.      *
  2289.      * @param \DateTime $dateReviewReady
  2290.      *
  2291.      * @return \DateTime
  2292.      */
  2293.     public function setDateReviewReady($dateReviewReady)
  2294.     {
  2295.         $this->dateReviewReady $dateReviewReady;
  2296.         return $this;
  2297.     }
  2298.     /**
  2299.      * Get dateReviewReady
  2300.      *
  2301.      * @return \DateTime
  2302.      */
  2303.     public function getDateReviewReady()
  2304.     {
  2305.         return $this->dateReviewReady;
  2306.     }
  2307.     /**
  2308.      * Set dateInvoiceReady
  2309.      *
  2310.      * @param \DateTime $dateInvoiceReady
  2311.      *
  2312.      * @return \DateTime
  2313.      */
  2314.     public function setDateInvoiceReady($dateInvoiceReady)
  2315.     {
  2316.         $this->dateInvoiceReady $dateInvoiceReady;
  2317.         return $this;
  2318.     }
  2319.     /**
  2320.      * Get dateInvoiceReady
  2321.      *
  2322.      * @return \DateTime
  2323.      */
  2324.     public function getDateInvoiceReady()
  2325.     {
  2326.         return $this->dateInvoiceReady;
  2327.     }
  2328.     /**
  2329.      * Set dateClosed
  2330.      *
  2331.      * @param \DateTime $dateClosed
  2332.      *
  2333.      * @return \DateTime
  2334.      */
  2335.     public function setDateClosed($dateClosed)
  2336.     {
  2337.         $this->dateClosed $dateClosed;
  2338.         return $this;
  2339.     }
  2340.     /**
  2341.      * Get dateClosed
  2342.      *
  2343.      * @return \DateTime
  2344.      */
  2345.     public function getDateClosed()
  2346.     {
  2347.         return $this->dateClosed;
  2348.     }
  2349.     /**
  2350.      * Set dateReopened
  2351.      *
  2352.      * @param \DateTime $dateReopened
  2353.      *
  2354.      * @return \DateTime
  2355.      */
  2356.     public function setDateReopened($dateReopened)
  2357.     {
  2358.         $this->dateReopened $dateReopened;
  2359.         return $this;
  2360.     }
  2361.     /**
  2362.      * Get dateReopened
  2363.      *
  2364.      * @return \DateTime
  2365.      */
  2366.     public function getDateReopened()
  2367.     {
  2368.         return $this->dateReopened;
  2369.     }
  2370.     /**
  2371.      * Set dateRejected
  2372.      *
  2373.      * @param \DateTime $dateRejected
  2374.      *
  2375.      * @return \DateTime
  2376.      */
  2377.     public function setDateRejected($dateRejected)
  2378.     {
  2379.         $this->dateRejected $dateRejected;
  2380.         return $this;
  2381.     }
  2382.     /**
  2383.      * Get dateRejected
  2384.      *
  2385.      * @return \DateTime
  2386.      */
  2387.     public function getDateRejected()
  2388.     {
  2389.         return $this->dateRejected;
  2390.     }
  2391.     /**
  2392.      * Get isInspected
  2393.      *
  2394.      * @return bool
  2395.      */
  2396.     public function getIsInspected()
  2397.     {
  2398.         //return (($this->getDateInspected()) ? ((strtotime($this->getDateInspected()->format("Y-m-d")) > '1969-12-31') ? true : false) : false);
  2399.         //return $this->isInspected;
  2400.         //check if dateInspected in set and greater than 12th Dec 1969 or the Claim does not need inspection in the first place
  2401.         if ($this->getDateInspected() != null && ((strtotime($this->getDateInspected()->format("Y-m-d")) > '1969-12-31') || !$this->getNeedsInspection())) {
  2402.             return true;
  2403.         } else {
  2404.             return false;
  2405.         }
  2406.     }
  2407.     /**
  2408.      * Get isContacted
  2409.      *
  2410.      * @return bool
  2411.      */
  2412.     public function getIsContacted()
  2413.     {
  2414.         if ($this->getDateContacted() != null && ((strtotime($this->getDateContacted()->format("Y-m-d")) > '1969-12-31'))) {
  2415.             return true;
  2416.         } else {
  2417.             return false;
  2418.         }
  2419.     }
  2420.     /**
  2421.      * Can we set the first contact date?
  2422.      *
  2423.      * @return int
  2424.      */
  2425.     public function getCanSetFirstContact()
  2426.     {
  2427.         if ($this->getStatus() != 30 && $this->getStatus() != 5) {
  2428.             return 1;
  2429.         } else {
  2430.             return 0;
  2431.         }
  2432.     }
  2433.     /**
  2434.      * Can we set the claim ready for review?
  2435.      *
  2436.      * @return int
  2437.      */
  2438.     public function getCanSetReadyForReview()
  2439.     {
  2440.         if ($this->getStatus() != 20 && $this->getStatus() != 30 && $this->getStatus() != 5) {
  2441.             return 1;
  2442.         } else {
  2443.             return 0;
  2444.         }
  2445.     }
  2446.     /**
  2447.      * Can we set the inspection date on this?
  2448.      *
  2449.      * @return int
  2450.      */
  2451.     public function getCanSetInspectionDate()
  2452.     {
  2453.         if ($this->getIsContacted() && $this->getStatus() != 30) {
  2454.             return 1;
  2455.         } else {
  2456.             return 0;
  2457.         }
  2458.     }
  2459.     /**
  2460.      * Set needsInspection
  2461.      *
  2462.      * @param boolean $needsInspection
  2463.      *
  2464.      * @return boolean
  2465.      */
  2466.     public function setNeedsInspection($needsInspection)
  2467.     {
  2468.         $this->needsInspection $needsInspection;
  2469.         return $this;
  2470.     }
  2471.     /**
  2472.      * Get needsInspection
  2473.      *
  2474.      * @return bool
  2475.      */
  2476.     public function getNeedsInspection()
  2477.     {
  2478.         return $this->needsInspection;
  2479.     }
  2480.     /**
  2481.      * Set needsAttyRep
  2482.      *
  2483.      * @param boolean $needsAttyRep
  2484.      *
  2485.      * @return boolean
  2486.      */
  2487.     /*public function setNeedsAttyRep($needsAttyRep)
  2488.     {
  2489.         $this->needsAttyRep = $needsAttyRep;
  2490.         return $this;
  2491.     }*/
  2492.     /**
  2493.      * Get needsAttyRep
  2494.      *
  2495.      * @return bool
  2496.      */
  2497.     /*public function getNeedsAttyRep()
  2498.     {
  2499.         return $this->needsAttyRep;
  2500.     }*/
  2501.     /**
  2502.      * Set needsPublicAdj
  2503.      *
  2504.      * @param boolean $needsPublicAdj
  2505.      *
  2506.      * @return boolean
  2507.      */
  2508.     /*public function setNeedsPublicAdj($needsPublicAdj)
  2509.     {
  2510.         $this->needsPublicAdj = $needsPublicAdj;
  2511.         return $this;
  2512.     }*/
  2513.     /**
  2514.      * Get needsPublicAdj
  2515.      *
  2516.      * @return bool
  2517.      */
  2518.     /*public function getNeedsPublicAdj()
  2519.     {
  2520.         return $this->needsPublicAdj;
  2521.     }*/
  2522.     /**
  2523.      * Set needsThirdParty
  2524.      *
  2525.      * @param boolean $needsThirdParty
  2526.      *
  2527.      * @return boolean
  2528.      */
  2529.     public function setNeedsThirdParty($needsThirdParty)
  2530.     {
  2531.         $this->needsThirdParty $needsThirdParty;
  2532.         return $this;
  2533.     }
  2534.     /**
  2535.      * Get needsThirdParty
  2536.      *
  2537.      * @return bool
  2538.      */
  2539.     public function getNeedsThirdParty()
  2540.     {
  2541.         return $this->needsThirdParty;
  2542.     }
  2543.     /**
  2544.      * Set agencyName
  2545.      *
  2546.      * @param string $agencyName
  2547.      *
  2548.      * @return string
  2549.      */
  2550.     /*public function setAgencyName($agencyName)
  2551.     {
  2552.         $this->agencyName = $agencyName;
  2553.         return $this;
  2554.     }*/
  2555.     /**
  2556.      * Get agencyName
  2557.      *
  2558.      * @return string
  2559.      */
  2560.     /*public function getAgencyName()
  2561.     {
  2562.         return $this->agencyName;
  2563.     }*/
  2564.     /**
  2565.      * Set xactErrorCode
  2566.      *
  2567.      * @param string $xactErrorCode
  2568.      *
  2569.      * @return string
  2570.      */
  2571.      public function setXactErrorCode($xactErrorCode)
  2572.     {
  2573.         $this->xactErrorCode $xactErrorCode;
  2574.         return $this;
  2575.     }
  2576.     /**
  2577.      * Get agencyPhone
  2578.      *
  2579.      * @return string
  2580.      */
  2581.      public function getXactErrorCode()
  2582.     {
  2583.         return $this->xactErrorCode;
  2584.     }
  2585.     /**
  2586.      * Set xactErrorMessage
  2587.      *
  2588.      * @param string $xactErrorMessage
  2589.      *
  2590.      * @return string
  2591.      */
  2592.     public function setXactErrorMessage($xactErrorMessage)
  2593.     {
  2594.         $this->xactErrorMessage $xactErrorMessage;
  2595.         return $this;
  2596.     }
  2597.     /**
  2598.      * Get agencyPhone
  2599.      *
  2600.      * @return string
  2601.      */
  2602.     public function getXactErrorMessage()
  2603.     {
  2604.         return $this->xactErrorMessage;
  2605.     }
  2606.     /**
  2607.      * Set formNumbers
  2608.      *
  2609.      * @param string $formNumbers
  2610.      *
  2611.      * @return string
  2612.      */
  2613.     public function setFormNumbers($formNumbers)
  2614.     {
  2615.         $this->formNumbers $formNumbers;
  2616.         return $this;
  2617.     }
  2618.     /**
  2619.      * Get formNumbers
  2620.      *
  2621.      * @return string
  2622.      */
  2623.     public function getFormNumbers()
  2624.     {
  2625.         return $this->formNumbers;
  2626.     }
  2627.     /**
  2628.      * Set formNumbersSet
  2629.      *
  2630.      * @param string $formNumbersSet
  2631.      *
  2632.      * @return string
  2633.      */
  2634.     public function setFormNumbersSet($formNumbersSet)
  2635.     {
  2636.         $this->formNumbersSet $formNumbersSet;
  2637.         return $this;
  2638.     }
  2639.     /**
  2640.      * Get formNumbersSet
  2641.      *
  2642.      * @return string
  2643.      */
  2644.     public function getFormNumbersSet()
  2645.     {
  2646.         return $this->formNumbersSet;
  2647.     }
  2648.     /**
  2649.      * Set mortgage
  2650.      *
  2651.      * @param string $mortgage
  2652.      *
  2653.      * @return string
  2654.      */
  2655.     public function setMortgage($mortgage)
  2656.     {
  2657.         $this->mortgage $mortgage;
  2658.         return $this;
  2659.     }
  2660.     /**
  2661.      * Get mortgage
  2662.      *
  2663.      * @return string
  2664.      */
  2665.     public function getMortgage()
  2666.     {
  2667.         return $this->mortgage;
  2668.     }
  2669.     /**
  2670.      * Set coinsurance
  2671.      *
  2672.      * @param string $coinsurance
  2673.      *
  2674.      * @return string
  2675.      */
  2676.     public function setCoinsurance($coinsurance)
  2677.     {
  2678.         $this->coinsurance $coinsurance;
  2679.         return $this;
  2680.     }
  2681.     /**
  2682.      * Get coinsurance
  2683.      *
  2684.      * @return string
  2685.      */
  2686.     public function getCoinsurance()
  2687.     {
  2688.         return $this->coinsurance;
  2689.     }
  2690.     /**
  2691.      * Set settlementType
  2692.      *
  2693.      * @param string $settlementType
  2694.      *
  2695.      * @return string
  2696.      */
  2697.     public function setSettlementType($settlementType)
  2698.     {
  2699.         $this->settlementType $settlementType;
  2700.         return $this;
  2701.     }
  2702.     /**
  2703.      * Get settlementType
  2704.      *
  2705.      * @return string
  2706.      */
  2707.     public function getSettlementType()
  2708.     {
  2709.         return $this->settlementType;
  2710.     }
  2711.     /**
  2712.      * Set specialNotes
  2713.      *
  2714.      * @param string $specialNotes
  2715.      *
  2716.      * @return string
  2717.      */
  2718.     public function setSpecialNotes($specialNotes)
  2719.     {
  2720.         $this->specialNotes $specialNotes;
  2721.         return $this;
  2722.     }
  2723.     /**
  2724.      * Get specialNotes
  2725.      *
  2726.      * @return string
  2727.      */
  2728.     public function getSpecialNotes()
  2729.     {
  2730.         return $this->specialNotes;
  2731.     }
  2732.     /**
  2733.      * Set policyType
  2734.      *
  2735.      * @param string $policyType
  2736.      *
  2737.      * @return string
  2738.      */
  2739.     public function setPolicyType($policyType)
  2740.     {
  2741.         $this->policyType $policyType;
  2742.         return $this;
  2743.     }
  2744.     /**
  2745.      * Get policyType
  2746.      *
  2747.      * @return string
  2748.      */
  2749.     public function getPolicyType()
  2750.     {
  2751.         return $this->policyType;
  2752.     }
  2753.     /**
  2754.      * @return mixed
  2755.      */
  2756.     public function getAssignmentDate()
  2757.     {
  2758.         return $this->assignmentDate;
  2759.     }
  2760.     /**
  2761.      * @param mixed $assignmentDate
  2762.      */
  2763.     public function setAssignmentDate($assignmentDate)
  2764.     {
  2765.         $this->assignmentDate $assignmentDate;
  2766.     }
  2767.     /**
  2768.      * @deprecated
  2769.      * @param Disbursement $disbursement
  2770.      */
  2771.     public function addDisbursement(Disbursement $disbursement)
  2772.     {
  2773.         if ($this->disbursements->contains($disbursement)) {
  2774.             return;
  2775.         }
  2776.         $this->disbursements->add($disbursement);
  2777.         $disbursement->setClaim($this);
  2778.     }
  2779.     /**
  2780.      * @deprecated
  2781.      * @param Disbursement $disbursement
  2782.      */
  2783.     public function removeDisbursement(Disbursement $disbursement)
  2784.     {
  2785.         if (!$this->disbursements->contains($disbursement)) {
  2786.             return;
  2787.         }
  2788.         $this->disbursements->removeElement($disbursement);
  2789.         $disbursement->removeClaim();
  2790.     }
  2791.     /**
  2792.      * @deprecated
  2793.      * @return array
  2794.      */
  2795.     public function getDisbursements()
  2796.     {
  2797.         return $this->disbursements->toArray();
  2798.     }
  2799.     /**
  2800.      * @param Invoice $invoice
  2801.      */
  2802.     public function addInvoice(Invoice $invoice)
  2803.     {
  2804.         if ($this->invoices->contains($invoice)) {
  2805.             return;
  2806.         }
  2807.         $this->invoices->add($invoice);
  2808.         $invoice->setClaim($this);
  2809.     }
  2810.     /**
  2811.      * @param Invoice $invoice
  2812.      */
  2813.     public function removeInvoice(Invoice $invoice)
  2814.     {
  2815.         if (!$this->invoices->contains($invoice)) {
  2816.             return;
  2817.         }
  2818.         $this->invoices->removeElement($invoice);
  2819.         $invoice->removeClaim();
  2820.     }
  2821.     /**
  2822.      * @return array
  2823.      */
  2824.     public function getInvoices()
  2825.     {
  2826.         return $this->invoices;
  2827.     }
  2828.     public function getInvoice()
  2829.     {
  2830.         $i 0;
  2831.         $invoices $this->getInvoices();
  2832.         foreach ($invoices as $invoice) {
  2833.             if ($i == 0) {
  2834.                 return $invoice;
  2835.             }
  2836.             $i++;
  2837.         }
  2838.         return null;
  2839.     }
  2840.     public function getClaimsInsureds()
  2841.     {
  2842.         return $this->claimsInsureds->toArray();
  2843.     }
  2844.     public function getClaimsOtherParties()
  2845.     {
  2846.         return $this->claimsOtherParty->toArray();
  2847.     }
  2848.     public function getClaimPerils()
  2849.     {
  2850.         return $this->claimPerils;
  2851.     }
  2852.     /**
  2853.      * @return array
  2854.      */
  2855.     public function getInsureds()
  2856.     {
  2857.         return $this->claimsInsureds->toArray();
  2858.     }
  2859.     /**
  2860.      * @return mixed
  2861.      */
  2862.     public function getAdminFeeCharged()
  2863.     {
  2864.         return $this->adminFeeCharged;
  2865.     }
  2866.     /**
  2867.      * @param mixed $adminFeeCharged
  2868.      */
  2869.     public function setAdminFeeCharged($adminFeeCharged)
  2870.     {
  2871.         $this->adminFeeCharged $adminFeeCharged;
  2872.     }
  2873.     public function getInsured()
  2874.     {
  2875.         $claimsInsureds $this->claimsInsureds;
  2876.         foreach ($claimsInsureds as $getClaimInsured) {
  2877.             if ($getClaimInsured->getIsPrimary() == true) {
  2878.                 return $getClaimInsured->getInsured();
  2879.             }
  2880.         }
  2881.         return null;
  2882.     }
  2883.     public function getBorrowerInsured()
  2884.     {
  2885.         $claimsInsureds $this->claimsInsureds;
  2886.         foreach ($claimsInsureds as $getClaimInsured) {
  2887.             if ($getClaimInsured->getClaimInsuredType()->getInsuredType() == "Borrower") {
  2888.                 return $getClaimInsured->getInsured();
  2889.             }
  2890.         }
  2891.         return null;
  2892.     }
  2893.     public function getClaimantInsured()
  2894.     {
  2895.         $claimsInsureds $this->claimsInsureds;
  2896.         foreach ($claimsInsureds as $getClaimInsured) {
  2897.             if ($getClaimInsured->getClaimInsuredType()->getInsuredType() == "Claimant") {
  2898.                 return $getClaimInsured->getInsured();
  2899.             }
  2900.         }
  2901.         return null;
  2902.     }
  2903.     public function getOtherInsured()
  2904.     {
  2905.         $claimsInsureds $this->claimsInsureds;
  2906.         foreach ($claimsInsureds as $getClaimInsured) {
  2907.             if ($getClaimInsured->getClaimInsuredType()->getInsuredType() == "Other") {
  2908.                 return $getClaimInsured->getInsured();
  2909.             }
  2910.         }
  2911.         return null;
  2912.     }
  2913.     public function getOtherPartyOther()
  2914.     {
  2915.         $claimsOtherParties $this->claimsOtherParty;
  2916.         /**
  2917.          * @var $getClaimOtherParty ClaimsOtherParty
  2918.          */
  2919.         foreach ($claimsOtherParties as $getClaimOtherParty) {
  2920.             if ($getClaimOtherParty->getClaimOtherPartyType()->getOtherPartyType() == "Other") {
  2921.                 return $getClaimOtherParty->getOtherParty();
  2922.             }
  2923.         }
  2924.         return null;
  2925.     }
  2926.     public function __toString()
  2927.     {
  2928.         return $this->getClaimNumber();
  2929.     }
  2930.     public function __clone()
  2931.     {
  2932.         // TODO: Implement __clone() method.
  2933.         /*
  2934.          *
  2935.          * These are the variables we want to indubitably carry over.
  2936.          ***
  2937.             private $lossLocations;
  2938.             private $reserves;
  2939.             private $coverages;
  2940.             private $deductibles;
  2941.             private $claimsInsureds;
  2942.             private $claimPerils;
  2943.         */
  2944.         # Unset the id we may have
  2945.         $this->id null;
  2946.         # Mark this as a clone (eventually, we'll set a parent)
  2947.         $this->claimNumber $this->claimNumber "-CLONE";
  2948.         $this->setStatus(5);
  2949.         /**
  2950.          * Reset some things we don't want CLONED
  2951.          */
  2952.         $this->disbursements = new ArrayCollection();
  2953.         $this->notes = new ArrayCollection();
  2954.         $this->resources = new ArrayCollection();
  2955.         # Copy over the loss locations (?)
  2956.         $lossLocations $this->getLossLocations();
  2957.         /** @var LossLocation $lossLocation */
  2958.         /*foreach($lossLocations as $lossLocation){
  2959.             $cloneLocation = clone $lossLocation;
  2960.             $this->addLossLocation($cloneLocation);
  2961.             $lossLocation->setClaim($this);
  2962.         }*/
  2963.         # Copy over the reserves
  2964.         $reserves $this->getReserves();
  2965.         /** @var Reserve $reserve */
  2966.         /*foreach($reserves as $reserve){
  2967.             $cloneReserve = clone $reserve;
  2968.             $this->addReserve($cloneReserve);
  2969.             $cloneReserve->setClaim($this);
  2970.         }*/
  2971.         # Copy over the coverages
  2972.         $coverages $this->getCoverages();
  2973.         /** @var Coverage $coverage */
  2974.         /*foreach($coverages as $coverage){
  2975.             $cloneCoverage = clone $coverage;
  2976.             $this->addCoverage($cloneCoverage);
  2977.             $cloneCoverage->setClaim($this);
  2978.         }*/
  2979.         # Copy over the deductibles
  2980.         $deductibles $this->getDeductibles();
  2981.         /** @var Deductible $deductible */
  2982.         /*foreach($deductibles as $deductible){
  2983.             $cloneDeductible = clone $deductible;
  2984.             $this->addDeductible($cloneDeductible);
  2985.             $cloneDeductible->setClaim($this);
  2986.         }*/
  2987.         # Copy over Insured records (multi. Insureds)
  2988.         $insureds $this->getInsureds();
  2989.         /** @var ClaimsInsured $insured */
  2990.         foreach ($insureds as $insured) {
  2991.             $cloneClaimInsured = clone $insured;
  2992.             // $this->addClaimInsured($cloneClaimInsured);
  2993.             $cloneClaimInsured->setClaim($this);
  2994.         }
  2995.         # Copy over Perils
  2996.         $perils $this->getClaimPerils();
  2997.         /** @var ClaimPeril $peril */
  2998.         /*foreach($perils as $peril){
  2999.             $cloneClaimPeril = clone $peril;
  3000.             // $this->addClaimPeril();
  3001.             $cloneClaimPeril->setClaim($this);
  3002.         }*/
  3003.     }
  3004.     /**
  3005.      * @return mixed
  3006.      */
  3007.     public function getClaimTeam()
  3008.     {
  3009.         if(empty($this->claimTeam) || $this->claimTeam->getId()==0) return null;
  3010.         return $this->claimTeam;
  3011.     }
  3012.     /**
  3013.      * @param mixed $claimTeam
  3014.      */
  3015.     public function setClaimTeam(ClaimTeam $claimTeam null)
  3016.     {
  3017.         $this->claimTeam $claimTeam;
  3018.     }
  3019.     /**
  3020.      * @return string
  3021.      */
  3022.     public function getTransactionId()
  3023.     {
  3024.         return $this->transactionId;
  3025.     }
  3026.     /**
  3027.      * @param string $transactionId
  3028.      */
  3029.     public function setTransactionId($transactionId)
  3030.     {
  3031.         $this->transactionId $transactionId;
  3032.     }
  3033.     /**
  3034.      * @return PlanID
  3035.      */
  3036.     public function getPlanId()
  3037.     {
  3038.         return $this->planId;
  3039.     }
  3040.     /**
  3041.      * @param PlanID $planId
  3042.      */
  3043.     public function setPlanId($planId null)
  3044.     {
  3045.         $this->planId $planId;
  3046.     }
  3047.     /**
  3048.      * @return mixed
  3049.      */
  3050.     public function getHasClaimantInvolved()
  3051.     {
  3052.         return $this->hasClaimantInvolved;
  3053.     }
  3054.     /**
  3055.      * @param mixed $hasClaimantInvolved
  3056.      */
  3057.     public function setHasClaimantInvolved($hasClaimantInvolved)
  3058.     {
  3059.         $this->hasClaimantInvolved $hasClaimantInvolved;
  3060.     }
  3061.     /**
  3062.      * @return mixed
  3063.      */
  3064.     /*public function getIsAttyHandling()
  3065.     {
  3066.         return $this->isAttyHandling;
  3067.     }*/
  3068.     /**
  3069.      * @param mixed $isAttyHandling
  3070.      */
  3071.     /*public function setIsAttyHandling($isAttyHandling)
  3072.     {
  3073.         $this->isAttyHandling = $isAttyHandling;
  3074.     }*/
  3075.     /**
  3076.      * @param Attribute $attribute
  3077.      */
  3078.     public function addAttribute(Attribute $attribute)
  3079.     {
  3080.         if ($this->attributes->contains($attribute)) {
  3081.             return;
  3082.         }
  3083.         $attribute->setClaim($this);
  3084.         $this->attributes->add($attribute);
  3085.         return;
  3086.     }
  3087.     public function addClaimInsureds(ClaimsInsured $claimsInsured)
  3088.     {
  3089.         if ($this->claimsInsureds->contains($claimsInsured)) {
  3090.             return;
  3091.         }
  3092.         $claimsInsured->setClaim($this);
  3093.         $this->claimsInsureds->add($claimsInsured);
  3094.         return;
  3095.     }
  3096.     public function addClaimOtherParty(ClaimsOtherParty $claimsOtherParty)
  3097.     {
  3098.         if ($this->claimsOtherParty->contains($claimsOtherParty)) {
  3099.             return $this;
  3100.         }
  3101.         $claimsOtherParty->setClaim($this);
  3102.         $this->claimsOtherParty->add($claimsOtherParty);
  3103.         return $this;
  3104.     }
  3105.     /**
  3106.      * @param Attribute $attribute
  3107.      * @return void
  3108.      */
  3109.     public function removeAttribute(Attribute $attribute)
  3110.     {
  3111.         if (!$this->attributes->contains($attribute)) {
  3112.             return;
  3113.         }
  3114.         $attribute->removeClaim();
  3115.         $this->attributes->remove($attribute);
  3116.         return;
  3117.     }
  3118.     /**
  3119.      * @param DuplicateClaim $duplicateClaim
  3120.      */
  3121.     public function addDuplicateClaim(DuplicateClaim $duplicateClaim)
  3122.     {
  3123.         if($this->duplicateClaims->contains($duplicateClaim)){
  3124.             return;
  3125.         }
  3126.         $duplicateClaim->setClaim($this);
  3127.         $this->duplicateClaims->add$duplicateClaim );
  3128.         return;
  3129.     }
  3130.     /**
  3131.      * @param DuplicateClaim $duplicateClaim
  3132.      * @return void
  3133.      */
  3134.     public function removeDuplicateClaim(DuplicateClaim $duplicateClaim)
  3135.     {
  3136.         if(!$this->duplicateClaims->contains($duplicateClaim)){
  3137.             return;
  3138.         }
  3139.         $duplicateClaim->removeClaim();
  3140.         $this->duplicateClaims->remove$duplicateClaim );
  3141.         return;
  3142.     }
  3143.     /**
  3144.      * @return array
  3145.      */
  3146.     public function getDuplicateClaims()
  3147.     {
  3148.         return $this->duplicateClaims->toArray();
  3149.     }
  3150.     /**
  3151.      * @param string $name
  3152.      * @return bool|Attribute
  3153.      */
  3154.     public function getAttribute($name "")
  3155.     {
  3156.         if (!empty($this->attributes)) {
  3157.             /** @var Attribute $attr */
  3158.             foreach ($this->attributes->toArray() as $attr) {
  3159.                 if ($attr->getName() == $name) {
  3160.                     return $attr;
  3161.                 }
  3162.             }
  3163.             return false;
  3164.         } else {
  3165.             return false;
  3166.         }
  3167.     }
  3168.     /**
  3169.      * @param ArrayCollection $arrayCollection
  3170.      */
  3171.     public function setResources(ArrayCollection $arrayCollection)
  3172.     {
  3173.         $this->resources $arrayCollection;
  3174.     }
  3175.     public function setPreviousResource(ArrayCollection $arrayCollection)
  3176.     {
  3177.         $this->previousResources $arrayCollection;
  3178.     }
  3179.     public function getInspectionNote()
  3180.     {
  3181.         return $this->inspectionNote;
  3182.     }
  3183.     public function setInspectionNote($inspectionNote)
  3184.     {
  3185.         $this->inspectionNote $inspectionNote;
  3186.     }
  3187.     /**
  3188.      * @return mixed
  3189.      */
  3190.     public function getMortgageBank()
  3191.     {
  3192.         return $this->mortgageBank;
  3193.     }
  3194.     /**
  3195.      * @param mixed $mortgageBank
  3196.      */
  3197.     public function setMortgageBank($mortgageBank)
  3198.     {
  3199.         $this->mortgageBank $mortgageBank;
  3200.     }
  3201.     /**
  3202.      * @return Resource
  3203.      */
  3204.     public function getClaimRep()
  3205.     {
  3206.         return $this->claimRep;
  3207.     }
  3208.     /**
  3209.      * @param Resource $claimRep
  3210.      */
  3211.     public function setClaimRep(Resource $claimRep)
  3212.     {
  3213.         $this->claimRep $claimRep;
  3214.     }
  3215.     /**
  3216.      * @return void
  3217.      */
  3218.     public function removeClaimRep()
  3219.     {
  3220.         $this->claimRep null;
  3221.     }
  3222.     /**
  3223.      * @return int
  3224.      */
  3225.     public function getReportPDFStacking()
  3226.     {
  3227.         return $this->reportPDFStacking;
  3228.     }
  3229.     /**
  3230.      * @param int $reportPDFStacking
  3231.      */
  3232.     public function setReportPDFStacking($reportPDFStacking)
  3233.     {
  3234.         $this->reportPDFStacking $reportPDFStacking;
  3235.     }
  3236.     /**
  3237.      * @return ClaimAgent
  3238.      */
  3239.     public function getAgent()
  3240.     {
  3241.         return $this->agent;
  3242.     }
  3243.     /**
  3244.      * @param ClaimAgent $agent
  3245.      */
  3246.     public function setAgent(ClaimAgent $agent)
  3247.     {
  3248.         $this->agent $agent;
  3249.     }
  3250.     /**
  3251.      * @return int
  3252.      */
  3253.     public function getParent()
  3254.     {
  3255.         return $this->parent;
  3256.     }
  3257.     /**
  3258.      * @param int $parent
  3259.      */
  3260.     public function setParent($parent)
  3261.     {
  3262.         $this->parent $parent;
  3263.     }
  3264.     /**
  3265.      * @return string
  3266.      */
  3267.     public function getTreatyNumber()
  3268.     {
  3269.         return $this->treatyNumber;
  3270.     }
  3271.     /**
  3272.      * @param string $treatyNumber
  3273.      */
  3274.     public function setTreatyNumber($treatyNumber)
  3275.     {
  3276.         $this->treatyNumber $treatyNumber;
  3277.     }
  3278.     /**
  3279.      * @return string
  3280.      */
  3281.     public function getSubTreatyNumber()
  3282.     {
  3283.         return $this->subTreatyNumber;
  3284.     }
  3285.     /**
  3286.      * @param string $subTreatyNumber
  3287.      */
  3288.     public function setSubTreatyNumber($subTreatyNumber)
  3289.     {
  3290.         $this->subTreatyNumber $subTreatyNumber;
  3291.     }
  3292.     ################################# BUSINESS LOGIC -- under our setters and getters
  3293.     /**
  3294.      * @param $form
  3295.      * @return bool
  3296.      */
  3297.     public function customerSubmittedIsset($form)
  3298.     {
  3299.         return isset($form['customer']);
  3300.     }
  3301.     /**
  3302.      * @param $customer
  3303.      * @return bool
  3304.      */
  3305.     public function customerExists($customer)
  3306.     {
  3307.         return $customer instanceof Customer;
  3308.     }
  3309.     /**
  3310.      * @param $customer
  3311.      * @param $form
  3312.      * @return bool
  3313.      */
  3314.     public function customerNotModified($customer$form)
  3315.     {
  3316.         return $this->customerExists($customer) && $customer->getId() == $form['customer'];
  3317.     }
  3318.     /**
  3319.      * @param $customer
  3320.      * @param $form
  3321.      * @return bool
  3322.      */
  3323.     public function failsChangeCustomerValidation($customer$form)
  3324.     {
  3325.         if ($this->customerSubmittedIsset($form)) {
  3326.             # if form is passed, validate
  3327.             return ($this->customerExists($customer)
  3328.                 && $this->customerNotModified($customer$form)) == false;
  3329.         } else {
  3330.             # if no form value, no need to validate
  3331.             return false;
  3332.         }
  3333.     }
  3334.     /**
  3335.      * @return string
  3336.      */
  3337.     public function getClaimBranchCode()
  3338.     {
  3339.         return $this->claimBranchCode;
  3340.     }
  3341.     /**
  3342.      * @param string $claimBranchCode
  3343.      */
  3344.     public function setClaimBranchCode($claimBranchCode)
  3345.     {
  3346.         $this->claimBranchCode $claimBranchCode;
  3347.     }
  3348.     /**
  3349.      * @return string
  3350.      */
  3351.     public function getAssigneeDisplay()
  3352.     {
  3353.         return $this->assigneeDisplay;
  3354.     }
  3355.     /**
  3356.      * @param string $assigneeDisplay
  3357.      */
  3358.     public function setAssigneeDisplay($assigneeDisplay)
  3359.     {
  3360.         $this->assigneeDisplay $assigneeDisplay;
  3361.     }
  3362.     /**
  3363.      * @return string
  3364.      */
  3365.     public function getPriorLossInfo()
  3366.     {
  3367.         return $this->priorLossInfo;
  3368.     }
  3369.     /**
  3370.      * @param string $priorLossInfo
  3371.      */
  3372.     public function setPriorLossInfo($priorLossInfo)
  3373.     {
  3374.         $this->priorLossInfo $priorLossInfo;
  3375.     }
  3376.     /**
  3377.      * @return string
  3378.      */
  3379.     public function getAgencyNumber()
  3380.     {
  3381.         return $this->agencyNumber;
  3382.     }
  3383.     /**
  3384.      * @param string $agencyNumber
  3385.      */
  3386.     public function setAgencyNumber($agencyNumber)
  3387.     {
  3388.         $this->agencyNumber $agencyNumber;
  3389.     }
  3390.     /**
  3391.      * @return string
  3392.      */
  3393.     public function getAdjustingFirmClaimNumber()
  3394.     {
  3395.         return $this->adjustingFirmClaimNumber;
  3396.     }
  3397.     /**
  3398.      * @param string $adjustingFirmClaimNumber
  3399.      */
  3400.     public function setAdjustingFirmClaimNumber($adjustingFirmClaimNumber)
  3401.     {
  3402.         $this->adjustingFirmClaimNumber $adjustingFirmClaimNumber;
  3403.     }
  3404.     /**
  3405.      * @return string
  3406.      */
  3407.     public function getDenialDescriptionLine()
  3408.     {
  3409.         return $this->denialDescriptionLine;
  3410.     }
  3411.     /**
  3412.      * @param string $denialDescriptionLine
  3413.      */
  3414.     public function setDenialDescriptionLine($denialDescriptionLine)
  3415.     {
  3416.         $this->denialDescriptionLine $denialDescriptionLine;
  3417.     }
  3418.     /**
  3419.      * @return CwopReason
  3420.      */
  3421.     public function getCwopReason()
  3422.     {
  3423.         return $this->cwopReason;
  3424.     }
  3425.     /**
  3426.      * @param CwopReason $cwopReason
  3427.      */
  3428.     public function setCwopReason($cwopReason)
  3429.     {
  3430.         $this->cwopReason $cwopReason;
  3431.     }
  3432.     /**
  3433.      * Set reopenAckDate
  3434.      *
  3435.      * @param \DateTime $reopenAckDate
  3436.      *
  3437.      * @return \DateTime
  3438.      */
  3439.     public function setReopenAckDate($reopenAckDate)
  3440.     {
  3441.         $this->reopenAckDate $reopenAckDate;
  3442.         return $this;
  3443.     }
  3444.     /**
  3445.      * Get reopenAckDate
  3446.      *
  3447.      * @return \DateTime
  3448.      */
  3449.     public function getReopenAckDate()
  3450.     {
  3451.         return $this->reopenAckDate;
  3452.     }
  3453.     /**
  3454.      * Set reopenClosedDate
  3455.      *
  3456.      * @param \DateTime $reopenClosedDate
  3457.      *
  3458.      * @return \DateTime
  3459.      */
  3460.     public function setReopenClosedDate($reopenClosedDate)
  3461.     {
  3462.         $this->reopenClosedDate $reopenClosedDate;
  3463.         return $this;
  3464.     }
  3465.     /**
  3466.      * Get reopenClosedDate
  3467.      *
  3468.      * @return \DateTime
  3469.      */
  3470.     public function getReopenClosedDate()
  3471.     {
  3472.         return $this->reopenClosedDate;
  3473.     }
  3474.     /**
  3475.      * @return SettlementType
  3476.      */
  3477.     public function getReopenSettlementType()
  3478.     {
  3479.         return $this->reopenSettlementType;
  3480.     }
  3481.     /**
  3482.      * @param SettlementType $reopenSettlementType
  3483.      */
  3484.     public function setReopenSettlementType($reopenSettlementType)
  3485.     {
  3486.         $this->reopenSettlementType $reopenSettlementType;
  3487.     }
  3488.     /**
  3489.      * @return CwopReason
  3490.      */
  3491.     public function getReopenCwopRsn()
  3492.     {
  3493.         return $this->reopenCwopRsn;
  3494.     }
  3495.     /**
  3496.      * @param CwopReason $reopenCwopRsn
  3497.      */
  3498.     public function setReopenCwopRsn($reopenCwopRsn)
  3499.     {
  3500.         $this->reopenCwopRsn $reopenCwopRsn;
  3501.     }
  3502.     /**
  3503.      * @return mixed
  3504.      */
  3505.     public function getSentToApi()
  3506.     {
  3507.         return $this->sentToApi;
  3508.     }
  3509.     /**
  3510.      * @param mixed $sentToApi
  3511.      */
  3512.     public function setSentToApi($sentToApi)
  3513.     {
  3514.         $this->sentToApi $sentToApi;
  3515.     }
  3516.     /**
  3517.      * @return mixed
  3518.      */
  3519.     public function getInsurerAddress()
  3520.     {
  3521.         return $this->insurerAddress;
  3522.     }
  3523.     /**
  3524.      * @param mixed $insurerAddress
  3525.      */
  3526.     public function setInsurerAddress($insurerAddress)
  3527.     {
  3528.         $this->insurerAddress $insurerAddress;
  3529.     }
  3530.     /**
  3531.      * @return mixed
  3532.      */
  3533.     public function getInsurerName()
  3534.     {
  3535.         return $this->insurerName;
  3536.     }
  3537.     /**
  3538.      * @param mixed $insurerName
  3539.      */
  3540.     public function setInsurerName($insurerName)
  3541.     {
  3542.         $this->insurerName $insurerName;
  3543.     }
  3544.     /**
  3545.      * @return mixed
  3546.      */
  3547.     public function getInsurerCode()
  3548.     {
  3549.         return $this->insurerCode;
  3550.     }
  3551.     /**
  3552.      * @param mixed $insurerCode
  3553.      */
  3554.     public function setInsurerCode($insurerCode)
  3555.     {
  3556.         $this->insurerCode $insurerCode;
  3557.     }
  3558.     /**
  3559.      * @return mixed
  3560.      */
  3561.     public function getClientEmail()
  3562.     {
  3563.         return $this->clientEmail;
  3564.     }
  3565.     /**
  3566.      * @param mixed $clientEmail
  3567.      */
  3568.     public function setClientEmail($clientEmail)
  3569.     {
  3570.         $this->clientEmail $clientEmail;
  3571.     }
  3572.     /**
  3573.      * @return mixed
  3574.      */
  3575.     public function getInsurerGroup()
  3576.     {
  3577.         return $this->insurerGroup;
  3578.     }
  3579.     /**
  3580.      * @param mixed $insurerGroup
  3581.      */
  3582.     public function setInsurerGroup($insurerGroup)
  3583.     {
  3584.         $this->insurerGroup $insurerGroup;
  3585.     }
  3586.     /**
  3587.      * @return string
  3588.      */
  3589.     public function getReopenDenialDescriptionLine()
  3590.     {
  3591.         return $this->reopenDenialDescriptionLine;
  3592.     }
  3593.     /**
  3594.      * @param string $reopenDenialDescriptionLine
  3595.      */
  3596.     public function setReopenDenialDescriptionLine($reopenDenialDescriptionLine)
  3597.     {
  3598.         $this->reopenDenialDescriptionLine $reopenDenialDescriptionLine;
  3599.     }
  3600.     /**
  3601.      * @return string
  3602.      */
  3603.     public function getLossLatitude()
  3604.     {
  3605.         return $this->lossLatitude;
  3606.     }
  3607.     /**
  3608.      * @param string $lossLatitude
  3609.      */
  3610.     public function setLossLatitude($lossLatitude)
  3611.     {
  3612.         //$this->lossLatitude = $lossLatitude;
  3613.        // $this->lossLatitude = $this->getLossZip();
  3614.         $address $this->getLossStreet();
  3615.         $zip $this->getLossZip();
  3616.         $state =  $this->getLossState();
  3617.         $city =  $this->getLossCity();
  3618.         $googleApiCall = new GoogleGeocoder();
  3619.          
  3620.         $latitudeLongitudeData =  $googleApiCall->getLatLongFromAddress($address$city$state$zip);
  3621.         $this->lossLatitude $latitudeLongitudeData['lat'];
  3622.     }
  3623.     /**
  3624.      * @return string
  3625.      */
  3626.     public function getLossLongitude()
  3627.     {
  3628.         return $this->lossLongitude;
  3629.     }
  3630.     /**
  3631.      * @param string $lossLongitude
  3632.      */
  3633.     public function setLossLongitude($lossLongitude)
  3634.     {
  3635.        // $this->lossLongitude = $lossLongitude;
  3636.         $address $this->getLossStreet();
  3637.         $zip $this->getLossZip();
  3638.         $state =  $this->getLossState();
  3639.         $city =  $this->getLossCity();
  3640.         $googleApiCall = new GoogleGeocoder();
  3641.         $latitudeLongitudeData =  $googleApiCall->getLatLongFromAddress($address$city$state$zip);
  3642.         $this->lossLongitude $latitudeLongitudeData['lng'];
  3643.     }
  3644.     /**
  3645.      * @return string
  3646.      */
  3647.     public function getCustomerCatCode()
  3648.     {
  3649.         return $this->customerCatCode;
  3650.     }
  3651.     /**
  3652.      * @param string $customerCatCode
  3653.      */
  3654.     public function setCustomerCatCode($customerCatCode)
  3655.     {
  3656.         $this->customerCatCode $customerCatCode;
  3657.     }
  3658.     /**
  3659.      * @return string
  3660.      */
  3661.     public function getLiabilityType()
  3662.     {
  3663.         return $this->liabilityType;
  3664.     }
  3665.     /**
  3666.      * @param string $liabilityType
  3667.      */
  3668.     public function setLiabilityType($liabilityType)
  3669.     {
  3670.         $this->liabilityType $liabilityType;
  3671.     }
  3672.     /**
  3673.      * @return string
  3674.      */
  3675.     public function getRecoveriesType()
  3676.     {
  3677.         return $this->recoveriesType;
  3678.     }
  3679.     /**
  3680.      * @param string $recoveriesType
  3681.      */
  3682.     public function setRecoveriesType($recoveriesType)
  3683.     {
  3684.         $this->recoveriesType $recoveriesType;
  3685.     }
  3686.     /**
  3687.      * @return string
  3688.      */
  3689.     public function getPropertyDamageType()
  3690.     {
  3691.         return $this->propertyDamageType;
  3692.     }
  3693.     /**
  3694.      * @param string $propertyDamageType
  3695.      */
  3696.     public function setPropertyDamageType($propertyDamageType)
  3697.     {
  3698.         $this->propertyDamageType $propertyDamageType;
  3699.     }
  3700.     /**
  3701.      * @param ArrayCollection $arrayCollection
  3702.      */
  3703.     public function setResourceExternal(ArrayCollection $arrayCollection)
  3704.     {
  3705.         $this->resourcesExternal $arrayCollection;
  3706.     }
  3707.     /**
  3708.      * @return array
  3709.      */
  3710.     public function getResourcesExternal()
  3711.     {
  3712.         return $this->resourcesExternal->toArray();
  3713.     }
  3714.     /**
  3715.      * @param ClaimResourceExternal $i
  3716.      */
  3717.     public function addResourceExternal($i)
  3718.     {
  3719.         if ($this->resourcesExternal->contains($i)) {
  3720.             return;
  3721.         }
  3722.         $this->resourcesExternal->add($i);
  3723.         $i->setClaim($this);
  3724.     }
  3725.     /**
  3726.      * @param ClaimResourceExternal $i
  3727.      */
  3728.     public function removeResourceExternal($i)
  3729.     {
  3730.         if (!$this->resourcesExternal->contains($i)) {
  3731.             return;
  3732.         }
  3733.         $this->resourcesExternal->removeElement($i);
  3734.         $i->removeClaim();
  3735.     }
  3736.     /**
  3737.      * @param ArrayCollection $arrayCollection
  3738.      */
  3739.     public function setAutoClaim(ArrayCollection $arrayCollection)
  3740.     {
  3741.         $this->autoClaim $arrayCollection;
  3742.     }
  3743.     /**
  3744.      * @return array
  3745.      */
  3746.     public function getAutoClaim()
  3747.     {
  3748.         return $this->autoClaim;
  3749.     }
  3750.     /**
  3751.      * @param AutoClaim $i
  3752.      */
  3753.     public function addAutoClaim($i)
  3754.     {
  3755.         if ($this->autoClaim->contains($i)) {
  3756.             return;
  3757.         }
  3758.         $this->autoClaim->add($i);
  3759.         $i->setClaim($this);
  3760.     }
  3761.     /**
  3762.      * @param AutoClaim $i
  3763.      */
  3764.     public function removeAutoClaim($i)
  3765.     {
  3766.         if (!$this->autoClaim->contains($i)) {
  3767.             return;
  3768.         }
  3769.         $this->autoClaim->removeElement($i);
  3770.         $i->removeClaim();
  3771.     }
  3772.     /**
  3773.      * @return integer
  3774.      */
  3775.     public function getIsClaimCategory()
  3776.     {
  3777.         return $this->isClaimCategory;
  3778.     }
  3779.     /**
  3780.      * @param integer $isClaimCategory
  3781.      */
  3782.     public function setIsClaimCategory($isClaimCategory)
  3783.     {
  3784.         $this->isClaimCategory $isClaimCategory;
  3785.     }
  3786.     /**
  3787.      * @return \DateTime|null
  3788.      */
  3789.     public function getCoverageEffectiveDate()
  3790.     {
  3791.         return $this->coverageEffectiveDate;
  3792.     }
  3793.     /**
  3794.      * @param $coverageEffectiveDate
  3795.      * @return $this
  3796.      */
  3797.     public function setCoverageEffectiveDate($coverageEffectiveDate): self
  3798.     {
  3799.         $this->coverageEffectiveDate $coverageEffectiveDate;
  3800.         return $this;
  3801.     }
  3802.     /**
  3803.      * @param $contact
  3804.      * @return $this
  3805.      */
  3806.     public function setContact($contact): self
  3807.     {
  3808.         $this->contact $contact;
  3809.         return $this;
  3810.     }
  3811.     /**
  3812.      * @return string|null
  3813.      */
  3814.     public function getContact()
  3815.     {
  3816.         return $this->contact;
  3817.     }
  3818.     /**
  3819.      * @param $contactResponsePhone
  3820.      * @return $this
  3821.      */
  3822.     public function setContactResponsePhone($contactResponsePhone): self
  3823.     {
  3824.         $this->contactResponsePhone $contactResponsePhone;
  3825.         return $this;
  3826.     }
  3827.     /**
  3828.      * @return string|null
  3829.      */
  3830.     public function getContactResponsePhone()
  3831.     {
  3832.         return $this->contactResponsePhone;
  3833.     }
  3834. }