src/Entity/Cases.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CaseRepository;
  4. use Doctrine\Common\Collections\{ArrayCollectionCollection};
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Gedmo\Mapping\Annotation as Gedmo;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. #[ORM\Entity(repositoryClassCaseRepository::class), ORM\Table(name'cases')]
  9. class Cases implements \Stringable
  10. {
  11.     #[ORM\IdORM\GeneratedValueORM\Column(type'integer')]
  12.     private $id;
  13.     #[ORM\Column(type'string'length40)]
  14.     private string $mrdId 'MRD-0001';
  15.     #[ORM\ManyToOne(targetEntityHospital::class), ORM\JoinColumn(nullablefalse)]
  16.     private $hospital;
  17.     #[ORM\ManyToOne(targetEntityPatient::class), ORM\JoinColumn(nullablefalse)]
  18.     private $patient;
  19.     #[ORM\ManyToOne(targetEntityUser::class), ORM\JoinColumn(name'doctor_id')]
  20.     private $doctor;
  21.     #[ORM\ManyToOne(targetEntityCases::class)]
  22.     private $prevCase;
  23.     #[ORM\Column(type'string'length255), Assert\NotBlank]
  24.     private $patientCategory;
  25.     #[ORM\Column(type'text'nullabletrue)]
  26.     private $familyHistory;
  27.     #[ORM\Column(type'text'nullabletrue)]
  28.     private $medicalHistory;
  29.     #[ORM\Column(type'text'nullabletrue)]
  30.     private $medicineHistory;
  31.     #[ORM\Column(type'text'nullabletrue)]
  32.     private $abha_number;
  33.     #[ORM\ManyToOne(targetEntityDiseaseCategory::class)]
  34.     private $diseaseCategory;
  35.     #[ORM\ManyToOne(targetEntityIcd10CauseGroup::class)]
  36.     private $icd10CauseGroup;
  37.     #[ORM\ManyToOne(targetEntityIcd10CauseSubGroup::class)]
  38.     private $icd10CauseSubGroup;
  39.     #[ORM\ManyToOne(targetEntityIcd10Disease::class)]
  40.     private $icd10Disease;
  41.     #[ORM\Column(type'text'nullabletrue)]
  42.     private $currentDiseaseHistory;
  43.     #[ORM\Column(type'boolean')]
  44.     private bool $isLab true;
  45.     #[ORM\Column(type'text'nullabletrue)]
  46.     private $confirmedDiagnosis;
  47.     #[ORM\Column(type'string'length7nullabletrue)]
  48.     private $temparature;
  49.     #[ORM\Column(type'string'length7nullabletrue)]
  50.     private $cns;
  51.     #[ORM\Column(type'string'length7nullabletrue)]
  52.     private $endrocine;
  53.     #[ORM\Column(type'string'length7nullabletrue)]
  54.     private $excretory;
  55.     #[ORM\Column(type'string'length7nullabletrue)]
  56.     private $pulse;
  57.     #[ORM\Column(type'string'length7nullabletrue)]
  58.     #[Assert\Length(
  59.         min2,
  60.         max3,
  61.         minMessage'BP Sys  must be at least {{ limit }} characters long',
  62.         maxMessage'BP Sys cannot be longer than {{ limit }} characters'
  63.     )]
  64.     #[Assert\Regex(pattern'/^[0-9]*$/'message'BP Sys cannot contain a Characters')]
  65.     private $bpUpper;
  66.     #[ORM\Column(type'string'length7nullabletrue)]
  67.     #[Assert\Length(
  68.         min2,
  69.         max3,
  70.         minMessage'BP Dia  must be at least {{ limit }} characters long',
  71.         maxMessage'BP Dia cannot be longer than {{ limit }} characters'
  72.     )]
  73.     #[Assert\Regex(pattern'/^[0-9]*$/'message'BP Dia cannot contain a Characters')]
  74.     private $bpLower;
  75.     #[ORM\Column(type'string'length7nullabletrue)]
  76.     #[Assert\Length(
  77.         min2,
  78.         max3,
  79.         minMessage'Respiration  must be at least {{ limit }} characters long',
  80.         maxMessage'Respiration cannot be longer than {{ limit }} characters'
  81.     )]
  82.     #[Assert\Regex(pattern'/^[0-9]*$/'message'Respiration cannot contain a Characters')]
  83.     private $respiration;
  84.     #[ORM\Column(type'string'length7nullabletrue)]
  85.     private $auscultation;
  86.     #[ORM\Column(type'text'nullabletrue)]
  87.     private $localExamination;
  88.     #[ORM\OneToMany(targetEntityCaseClinicalPattern::class, mappedBy'case'orphanRemovaltrue)]
  89.     private $clinicalPatterns;
  90.     #[ORM\OneToMany(targetEntityCaseProvisionalExamination::class, mappedBy'case'orphanRemovaltrue)]
  91.     private $provisionalExaminations;
  92.     #[ORM\OneToMany(targetEntityCaseProvisionalDiagnosis::class, mappedBy'case'orphanRemovaltrue)]
  93.     private $provisionalDiagnosis;
  94.     #[ORM\OneToMany(targetEntityCaseSymptom::class, mappedBy'case'orphanRemovaltrue)]
  95.     #[ORM\JoinColumn(nullabletrue)]
  96.     private $symptoms;
  97.     #[ORM\OneToMany(targetEntityCaseNcd::class, mappedBy'case'orphanRemovaltrue)]
  98.     #[ORM\JoinColumn(nullabletrue)]
  99.     private $ncds;
  100.     #[ORM\OneToMany(targetEntityCaseReferral::class, mappedBy'case'orphanRemovaltrue)]
  101.     private $referrals;
  102.     #[ORM\OneToMany(targetEntityCaseLaboratory::class, mappedBy'case'orphanRemovaltrue)]
  103.     private $labTests;
  104.     #[ORM\Column(type'boolean')]
  105.     private bool $isMedicine false;
  106.     #[ORM\Column(type'boolean')]
  107.     private bool $isWard false;
  108.     #[ORM\Column(type'date'nullabletrue)]
  109.     private $followUpDate;
  110.     #[ORM\Column(type'boolean')]
  111.     private bool $isPmDone false;
  112.     #[ORM\Column(type'boolean')]
  113.     private bool $isDeathCertGen false;
  114.     #[ORM\Column(type'boolean')]
  115.     private bool $isBirthCertGen false;
  116.     #[ORM\Column(type'boolean')]
  117.     private bool $isClosed false;
  118.     #[ORM\Column(type'boolean')]
  119.     private bool $isReopened false;
  120.     #[ORM\Column(type'boolean')]
  121.     private bool $isOpinion false;
  122.     #[ORM\Column(type'boolean')]
  123.     private bool $isReferral false;
  124.     #[ORM\Column(type'text'nullabletrue)]
  125.     private $emergencyStaffNotes;
  126.     #[ORM\Column(type'text'nullabletrue)]
  127.     private $pharmacyStaffNotes;
  128.     #[ORM\Column(type'text'nullabletrue)]
  129.     private $wardStaffNotes;
  130.     #[ORM\OneToOne(targetEntityWardBed::class, mappedBy'case'cascade: ['persist''remove'])]
  131.     private $wardBed;
  132.     #[ORM\Column(type'text'nullabletrue)]
  133.     private $pharmacyPatientNotes;
  134.     #[ORM\Column(type'string'length100nullabletrue)]
  135.     private $closureReason;
  136.     #[Gedmo\Timestampable(on'create'), ORM\Column(type'datetime')]
  137.     private $createdAt;
  138.     #[Gedmo\Timestampable(on'update'), ORM\Column(type'datetime')]
  139.     private $updatedAt;
  140.     #[ORM\Column(name'lab_test_status'type'string'nullabletruecolumnDefinition"enum('Pending', 'Sample taken', 'Completed')")]
  141.     private $labTestStatus;
  142.     #[ORM\Column(name'case_medicine_status'type'string'nullabletruecolumnDefinition"enum('Pending', 'Completed')")]
  143.     private $caseMedicineStatus;
  144.     #[ORM\Column(name'ward_medicine_status'type'string'nullabletruecolumnDefinition"enum('Pending', 'Completed')")]
  145.     private $wardMedicineStatus;
  146.     #[Gedmo\Blameable(on'create'), ORM\ManyToOne(targetEntityUser::class), ORM\JoinColumn(name'created_by')]
  147.     private $createdBy;
  148.     #[Gedmo\Blameable(on'update'), ORM\ManyToOne(targetEntityUser::class), ORM\JoinColumn(name'updated_by')]
  149.     private $updatedBy;
  150.     #[ORM\OneToOne(targetEntityDeliveryDetail::class, mappedBy'case'cascade: ['persist''remove'])]
  151.     private $deliveryDetail;
  152.     #[ORM\OneToOne(mappedBy'case'targetEntityInjuredInfo::class, cascade: ['persist''remove'])]
  153.     private $injuredInfo;
  154.     #[ORM\OneToOne(mappedBy'case'targetEntityPostMortemReport::class, cascade: ['persist''remove'])]
  155.     private $postMortemReport;
  156.     #[ORM\OneToOne(mappedBy'case'targetEntityDeathCertificate::class, cascade: ['persist''remove'])]
  157.     private $deathCertificate;
  158.     #[ORM\OneToOne(mappedBy'case'targetEntityBirthCertificate::class, cascade: ['persist''remove'])]
  159.     private $birthCertificate;
  160.     public function __construct()
  161.     {
  162.         $this->clinicalPatterns = new ArrayCollection();
  163.         $this->provisionalExaminations = new ArrayCollection();
  164.         $this->provisionalDiagnosis = new ArrayCollection();
  165.         $this->symptoms = new ArrayCollection();
  166.         $this->ncds = new ArrayCollection();
  167.         $this->referrals = new ArrayCollection();
  168.         $this->labTests = new ArrayCollection();
  169.     }
  170.     public function getId(): ?int
  171.     {
  172.         return $this->id;
  173.     }
  174.     public function getMrdId(): ?string
  175.     {
  176.         return $this->mrdId;
  177.     }
  178.     public function setMrdId(string $mrdId): self
  179.     {
  180.         $this->mrdId $mrdId;
  181.         return $this;
  182.     }
  183.     public function getHospital(): ?Hospital
  184.     {
  185.         return $this->hospital;
  186.     }
  187.     public function setHospital(Hospital $hospital): self
  188.     {
  189.         $this->hospital $hospital;
  190.         return $this;
  191.     }
  192.     public function getPatient(): ?Patient
  193.     {
  194.         return $this->patient;
  195.     }
  196.     public function setPatient(Patient $patient): self
  197.     {
  198.         $this->patient $patient;
  199.         return $this;
  200.     }
  201.     public function getDoctor(): ?User
  202.     {
  203.         return $this->doctor;
  204.     }
  205.     public function setDoctor(User $doctor): self
  206.     {
  207.         $this->doctor $doctor;
  208.         return $this;
  209.     }
  210.     public function getPrevCase(): ?Cases
  211.     {
  212.         return $this->prevCase;
  213.     }
  214.     public function setPrevCase(Cases $prevCase): self
  215.     {
  216.         $this->prevCase $prevCase;
  217.         return $this;
  218.     }
  219.     public function getTemparature(): ?string
  220.     {
  221.         return $this->temparature;
  222.     }
  223.     public function setTemparature(?string $temparature): self
  224.     {
  225.         $this->temparature $temparature;
  226.         return $this;
  227.     }
  228.     public function getCns(): ?string
  229.     {
  230.         return $this->cns;
  231.     }
  232.     public function setCns(?string $cns): self
  233.     {
  234.         $this->cns strip_tags($cns);
  235.         return $this;
  236.     }
  237.     public function getEndrocine(): ?string
  238.     {
  239.         return $this->endrocine;
  240.     }
  241.     public function setEndrocine(?string $endrocine): self
  242.     {
  243.         $this->endrocine strip_tags($endrocine);
  244.         return $this;
  245.     }
  246.     public function getExcretory(): ?string
  247.     {
  248.         return $this->excretory;
  249.     }
  250.     public function setExcretory(?string $excretory): self
  251.     {
  252.         $this->excretory strip_tags($excretory);
  253.         return $this;
  254.     }
  255.     public function getCreatedAt(): ?\DateTimeInterface
  256.     {
  257.         return $this->createdAt;
  258.     }
  259.     public function getUpdatedAt(): ?\DateTimeInterface
  260.     {
  261.         return $this->updatedAt;
  262.     }
  263.     public function getDiseaseCategory(): ?DiseaseCategory
  264.     {
  265.         return $this->diseaseCategory;
  266.     }
  267.     public function setDiseaseCategory(?DiseaseCategory $diseaseCategory): self
  268.     {
  269.         $this->diseaseCategory $diseaseCategory;
  270.         return $this;
  271.     }
  272.     public function getIcd10CauseGroup(): ?Icd10CauseGroup
  273.     {
  274.         return $this->icd10CauseGroup;
  275.     }
  276.     public function setIcd10CauseGroup(?Icd10CauseGroup $icd10CauseGroup): self
  277.     {
  278.         $this->icd10CauseGroup $icd10CauseGroup;
  279.         return $this;
  280.     }
  281.     public function getIcd10CauseSubGroup(): ?Icd10CauseSubGroup
  282.     {
  283.         return $this->icd10CauseSubGroup;
  284.     }
  285.     public function setIcd10CauseSubGroup(?Icd10CauseSubGroup $icd10CauseSubGroup): self
  286.     {
  287.         $this->icd10CauseSubGroup $icd10CauseSubGroup;
  288.         return $this;
  289.     }
  290.     public function getIcd10Disease(): ?Icd10Disease
  291.     {
  292.         return $this->icd10Disease;
  293.     }
  294.     public function setIcd10Disease(?Icd10Disease $icd10Disease): self
  295.     {
  296.         $this->icd10Disease $icd10Disease;
  297.         return $this;
  298.     }
  299.     public function getPatientCategory(): ?string
  300.     {
  301.         return $this->patientCategory;
  302.     }
  303.     public function setPatientCategory(?string $patientCategory): self
  304.     {
  305.         $this->patientCategory $patientCategory;
  306.         return $this;
  307.     }
  308.     public function getFamilyHistory(): ?string
  309.     {
  310.         return $this->familyHistory;
  311.     }
  312.     public function setFamilyHistory(?string $familyHistory): self
  313.     {
  314.         $this->familyHistory strip_tags($familyHistory);
  315.         return $this;
  316.     }
  317.     public function getMedicalHistory(): ?string
  318.     {
  319.         return $this->medicalHistory;
  320.     }
  321.     public function setMedicalHistory(?string $medicalHistory): self
  322.     {
  323.         $this->medicalHistory strip_tags($medicalHistory);
  324.         return $this;
  325.     }
  326.     public function getMedicineHistory(): ?string
  327.     {
  328.         return $this->medicineHistory;
  329.     }
  330.     public function setMedicineHistory(?string $medicineHistory): self
  331.     {
  332.         $this->medicineHistory strip_tags($medicineHistory);
  333.         return $this;
  334.     }
  335.     public function getCurrentDiseaseHistory(): ?string
  336.     {
  337.         return $this->currentDiseaseHistory;
  338.     }
  339.     public function setCurrentDiseaseHistory(?string $currentDiseaseHistory): self
  340.     {
  341.         $this->currentDiseaseHistory strip_tags($currentDiseaseHistory);
  342.         return $this;
  343.     }
  344.     public function getIsLab(): ?bool
  345.     {
  346.         return $this->isLab;
  347.     }
  348.     public function setIsLab(bool $isLab): self
  349.     {
  350.         $this->isLab $isLab;
  351.         return $this;
  352.     }
  353.     public function getAbhanumber(): ?string
  354.     {
  355.         return $this->abha_number;
  356.     }
  357.     public function setAbhanumber(string $AbhaNumber): self
  358.     {
  359.         $this->abha_number $AbhaNumber;
  360.         return $this;
  361.     }
  362.     public function getConfirmedDiagnosis(): ?string
  363.     {
  364.         return $this->confirmedDiagnosis;
  365.     }
  366.     public function setConfirmedDiagnosis(?string $confirmedDiagnosis): self
  367.     {
  368.         $this->confirmedDiagnosis strip_tags($confirmedDiagnosis);
  369.         return $this;
  370.     }
  371.     public function getPulse(): ?string
  372.     {
  373.         return $this->pulse;
  374.     }
  375.     public function setPulse(?string $pulse): self
  376.     {
  377.         $this->pulse $pulse;
  378.         return $this;
  379.     }
  380.     public function getBpUpper(): ?string
  381.     {
  382.         return $this->bpUpper;
  383.     }
  384.     public function setBpUpper(?string $bpUpper): self
  385.     {
  386.         $this->bpUpper $bpUpper;
  387.         return $this;
  388.     }
  389.     public function getBpLower(): ?string
  390.     {
  391.         return $this->bpLower;
  392.     }
  393.     public function setBpLower(?string $bpLower): self
  394.     {
  395.         $this->bpLower $bpLower;
  396.         return $this;
  397.     }
  398.     public function getRespiration(): ?string
  399.     {
  400.         return $this->respiration;
  401.     }
  402.     public function setRespiration(?string $respiration): self
  403.     {
  404.         $this->respiration $respiration;
  405.         return $this;
  406.     }
  407.     public function getAuscultation(): ?string
  408.     {
  409.         return $this->auscultation;
  410.     }
  411.     public function setAuscultation(?string $auscultation): self
  412.     {
  413.         $this->auscultation $auscultation;
  414.         return $this;
  415.     }
  416.     public function getLocalExamination(): ?string
  417.     {
  418.         return $this->localExamination;
  419.     }
  420.     public function setLocalExamination(string $localExamination): self
  421.     {
  422.         $this->localExamination strip_tags($localExamination);
  423.         return $this;
  424.     }
  425.     public function getIsMedicine(): ?bool
  426.     {
  427.         return $this->isMedicine;
  428.     }
  429.     public function setIsMedicine(bool $isMedicine): self
  430.     {
  431.         $this->isMedicine $isMedicine;
  432.         return $this;
  433.     }
  434.     public function getIsWard(): ?bool
  435.     {
  436.         return $this->isWard;
  437.     }
  438.     public function setIsWard(bool $isWard): self
  439.     {
  440.         $this->isWard $isWard;
  441.         return $this;
  442.     }
  443.     public function getFollowUpDate(): ?\DateTimeInterface
  444.     {
  445.         return $this->followUpDate;
  446.     }
  447.     public function setFollowUpDate(?\DateTimeInterface $followUpDate): self
  448.     {
  449.         $this->followUpDate $followUpDate;
  450.         return $this;
  451.     }
  452.     public function getIsDeathCertGen(): ?bool
  453.     {
  454.         return $this->isDeathCertGen;
  455.     }
  456.     public function setIsDeathCertGen(bool $isDeathCertGen): self
  457.     {
  458.         $this->isDeathCertGen $isDeathCertGen;
  459.         return $this;
  460.     }
  461.     public function getIsBirthCertGen(): ?bool
  462.     {
  463.         return $this->isBirthCertGen;
  464.     }
  465.     public function setIsBirthCertGen(bool $isBirthCertGen): self
  466.     {
  467.         $this->isBirthCertGen $isBirthCertGen;
  468.         return $this;
  469.     }
  470.     public function getIsPmDone(): ?bool
  471.     {
  472.         return $this->isPmDone;
  473.     }
  474.     public function setIsPmDone(bool $isPmDone): self
  475.     {
  476.         $this->isPmDone $isPmDone;
  477.         return $this;
  478.     }
  479.     public function getIsClosed(): ?bool
  480.     {
  481.         return $this->isClosed;
  482.     }
  483.     public function setIsClosed(bool $isClosed): self
  484.     {
  485.         $this->isClosed $isClosed;
  486.         return $this;
  487.     }
  488.     public function getIsReopened(): ?bool
  489.     {
  490.         return $this->isReopened;
  491.     }
  492.     public function setIsReopened(bool $isReopened): self
  493.     {
  494.         $this->isReopened $isReopened;
  495.         return $this;
  496.     }
  497.     public function getIsOpinion(): ?bool
  498.     {
  499.         return $this->isOpinion;
  500.     }
  501.     public function setIsOpinion(bool $isOpinion): self
  502.     {
  503.         $this->isOpinion $isOpinion;
  504.         return $this;
  505.     }
  506.     public function getIsReferral(): ?bool
  507.     {
  508.         return $this->isReferral;
  509.     }
  510.     public function setIsReferral(bool $isReferral): self
  511.     {
  512.         $this->isReferral $isReferral;
  513.         return $this;
  514.     }
  515.     public function getEmergencyStaffNotes(): ?string
  516.     {
  517.         return $this->emergencyStaffNotes;
  518.     }
  519.     public function setEmergencyStaffNotes(?string $emergencyStaffNotes): self
  520.     {
  521.         $this->emergencyStaffNotes $emergencyStaffNotes;
  522.         return $this;
  523.     }
  524.     public function getPharmacyStaffNotes(): ?string
  525.     {
  526.         return $this->pharmacyStaffNotes;
  527.     }
  528.     public function setPharmacyStaffNotes(?string $pharmacyStaffNotes): self
  529.     {
  530.         $this->pharmacyStaffNotes $pharmacyStaffNotes;
  531.         return $this;
  532.     }
  533.     public function getWardStaffNotes(): ?string
  534.     {
  535.         return $this->wardStaffNotes;
  536.     }
  537.     public function setWardStaffNotes(?string $wardStaffNotes): self
  538.     {
  539.         $this->wardStaffNotes $wardStaffNotes;
  540.         return $this;
  541.     }
  542.     public function getWardBed(): ?WardBed
  543.     {
  544.         return $this->wardBed;
  545.     }
  546.     public function setWardBed(WardBed $wardBed): self
  547.     {
  548.         $this->wardBed $wardBed;
  549.         return $this;
  550.     }
  551.     public function getPharmacyPatientNotes(): ?string
  552.     {
  553.         return $this->pharmacyPatientNotes;
  554.     }
  555.     public function setPharmacyPatientNotes(?string $pharmacyPatientNotes): self
  556.     {
  557.         $this->pharmacyPatientNotes $pharmacyPatientNotes;
  558.         return $this;
  559.     }
  560.     public function getClosureReason(): ?string
  561.     {
  562.         return $this->closureReason;
  563.     }
  564.     public function setClosureReason(?string $closureReason): self
  565.     {
  566.         $this->closureReason $closureReason;
  567.         return $this;
  568.     }
  569.     public function getCreatedBy(): ?User
  570.     {
  571.         return $this->createdBy;
  572.     }
  573.     public function getUpdatedBy(): ?User
  574.     {
  575.         return $this->updatedBy;
  576.     }
  577.     public function getLabTestStatus(): ?string
  578.     {
  579.         return $this->labTestStatus;
  580.     }
  581.     public function setLabTestStatus(?string $labTestStatus): self
  582.     {
  583.         $this->labTestStatus $labTestStatus;
  584.         return $this;
  585.     }
  586.     public function getCaseMedicineStatus(): ?string
  587.     {
  588.         return $this->caseMedicineStatus;
  589.     }
  590.     public function setCaseMedicineStatus(?string $caseMedicineStatus): self
  591.     {
  592.         $this->caseMedicineStatus $caseMedicineStatus;
  593.         return $this;
  594.     }
  595.     public function getWardMedicineStatus(): ?string
  596.     {
  597.         return $this->wardMedicineStatus;
  598.     }
  599.     public function setWardMedicineStatus(?string $wardMedicineStatus): self
  600.     {
  601.         $this->wardMedicineStatus $wardMedicineStatus;
  602.         return $this;
  603.     }
  604.     /**
  605.      * @return Collection|CaseClinicalPattern[]
  606.      */
  607.     public function getClinicalPatterns(): Collection
  608.     {
  609.         return $this->clinicalPatterns;
  610.     }
  611.     public function addClinicalPattern(CaseClinicalPattern $clinicalPattern): self
  612.     {
  613.         if (!$this->clinicalPatterns->contains($clinicalPattern)) {
  614.             $this->clinicalPatterns[] = $clinicalPattern;
  615.             $clinicalPattern->setCase($this);
  616.         }
  617.         return $this;
  618.     }
  619.     /**
  620.      * @return Collection|CaseProvisionalExamination[]
  621.      */
  622.     public function getProvisionalExaminations(): Collection
  623.     {
  624.         return $this->provisionalExaminations;
  625.     }
  626.     public function addProvisionalExamination(CaseProvisionalExamination $provisionalExamination): self
  627.     {
  628.         if (!$this->provisionalExaminations->contains($provisionalExamination)) {
  629.             $this->provisionalExaminations[] = $provisionalExamination;
  630.             $provisionalExamination->setCase($this);
  631.         }
  632.         return $this;
  633.     }
  634.     /**
  635.      * @return Collection|CaseProvisionalDiagnosis[]
  636.      */
  637.     public function getProvisionalDiagnosis(): Collection
  638.     {
  639.         return $this->provisionalDiagnosis;
  640.     }
  641.     public function addProvisionalDiagnosis(CaseProvisionalDiagnosis $provisionalDiagnosis): self
  642.     {
  643.         if (!$this->provisionalDiagnosis->contains($provisionalDiagnosis)) {
  644.             $this->provisionalDiagnosis[] = $provisionalDiagnosis;
  645.             $provisionalDiagnosis->setCase($this);
  646.         }
  647.         return $this;
  648.     }
  649.     /**
  650.      * @return Collection|CaseSymptom[]
  651.      */
  652.     public function getSymptoms(): Collection
  653.     {
  654.         return $this->symptoms;
  655.     }
  656.     public function addSymptom(CaseSymptom $symptom): self
  657.     {
  658.         if (!$this->symptoms->contains($symptom)) {
  659.             $this->symptoms[] = $symptom;
  660.             $symptom->setCase($this);
  661.         }
  662.         return $this;
  663.     }
  664.     /**
  665.      * @return Collection|CaseNcd[]
  666.      */
  667.     public function getNcds(): Collection
  668.     {
  669.         return $this->ncds;
  670.     }
  671.     public function addNcd(CaseNcd $ncd): self
  672.     {
  673.         if (!$this->ncds->contains($ncd)) {
  674.             $this->ncds[] = $ncd;
  675.             $ncd->setCase($this);
  676.         }
  677.         return $this;
  678.     }
  679.     /**
  680.      * @return Collection|CaseReferral[]
  681.      */
  682.     public function getReferrals(): Collection
  683.     {
  684.         return $this->referrals;
  685.     }
  686.     public function addReferral(CaseReferral $referral): self
  687.     {
  688.         if (!$this->referrals->contains($referral)) {
  689.             $this->referrals[] = $referral;
  690.             $referral->setCase($this);
  691.         }
  692.         return $this;
  693.     }
  694.     /**
  695.      * @return Collection|CaseLaboratory[]
  696.      */
  697.     public function getLabTests(): Collection
  698.     {
  699.         return $this->labTests;
  700.     }
  701.     public function addLabTest(CaseLaboratory $labTest): self
  702.     {
  703.         if (!$this->labTests->contains($labTest)) {
  704.             $this->labTests[] = $labTest;
  705.             $labTest->setCase($this);
  706.         }
  707.         return $this;
  708.     }
  709.     public function hasOpinion(): bool
  710.     {
  711.         foreach ($this->referrals as $referral) {
  712.             if ($referral->getIsOpinion()) {
  713.                 return true;
  714.             }
  715.         }
  716.         return false;
  717.     }
  718.     public function getDeliveryDetail(): ?DeliveryDetail
  719.     {
  720.         return $this->deliveryDetail;
  721.     }
  722.     public function setDeliveryDetail(DeliveryDetail $deliveryDetail): self
  723.     {
  724.         if ($deliveryDetail->getCase() !== $this) {
  725.             $deliveryDetail->setCase($this);
  726.         }
  727.         $this->deliveryDetail $deliveryDetail;
  728.         return $this;
  729.     }
  730.     public function __toString(): string
  731.     {
  732.         return $this->getMrdId();
  733.     }
  734.     public function removeClinicalPattern(CaseClinicalPattern $clinicalPattern): self
  735.     {
  736.         if ($this->clinicalPatterns->removeElement($clinicalPattern)) {
  737.             if ($clinicalPattern->getCase() === $this) {
  738.                 $clinicalPattern->setCase(null);
  739.             }
  740.         }
  741.         return $this;
  742.     }
  743.     public function removeProvisionalExamination(CaseProvisionalExamination $provisionalExamination): self
  744.     {
  745.         if ($this->provisionalExaminations->removeElement($provisionalExamination)) {
  746.             if ($provisionalExamination->getCase() === $this) {
  747.                 $provisionalExamination->setCase(null);
  748.             }
  749.         }
  750.         return $this;
  751.     }
  752.     public function addProvisionalDiagnosi(CaseProvisionalDiagnosis $provisionalDiagnosi): self
  753.     {
  754.         if (!$this->provisionalDiagnosis->contains($provisionalDiagnosi)) {
  755.             $this->provisionalDiagnosis[] = $provisionalDiagnosi;
  756.             $provisionalDiagnosi->setCase($this);
  757.         }
  758.         return $this;
  759.     }
  760.     public function removeProvisionalDiagnosi(CaseProvisionalDiagnosis $provisionalDiagnosi): self
  761.     {
  762.         if ($this->provisionalDiagnosis->removeElement($provisionalDiagnosi)) {
  763.             if ($provisionalDiagnosi->getCase() === $this) {
  764.                 $provisionalDiagnosi->setCase(null);
  765.             }
  766.         }
  767.         return $this;
  768.     }
  769.     public function removeSymptom(CaseSymptom $symptom): self
  770.     {
  771.         if ($this->symptoms->removeElement($symptom)) {
  772.             if ($symptom->getCase() === $this) {
  773.                 $symptom->setCase(null);
  774.             }
  775.         }
  776.         return $this;
  777.     }
  778.     public function removeNcd(CaseNcd $ncd): self
  779.     {
  780.         if ($this->ncds->removeElement($ncd)) {
  781.             if ($ncd->getCase() === $this) {
  782.                 $ncd->setCase(null);
  783.             }
  784.         }
  785.         return $this;
  786.     }
  787.     public function removeReferral(CaseReferral $referral): self
  788.     {
  789.         if ($this->referrals->removeElement($referral)) {
  790.             if ($referral->getCase() === $this) {
  791.                 $referral->setCase(null);
  792.             }
  793.         }
  794.         return $this;
  795.     }
  796.     public function removeLabTest(CaseLaboratory $labTest): self
  797.     {
  798.         if ($this->labTests->removeElement($labTest)) {
  799.             if ($labTest->getCase() === $this) {
  800.                 $labTest->setCase(null);
  801.             }
  802.         }
  803.         return $this;
  804.     }
  805.     public function getInjuredInfo(): ?InjuredInfo
  806.     {
  807.         return $this->injuredInfo;
  808.     }
  809.     public function setInjuredInfo(InjuredInfo $injuredInfo): self
  810.     {
  811.         if ($injuredInfo->getCase() !== $this) {
  812.             $injuredInfo->setCase($this);
  813.         }
  814.         $this->injuredInfo $injuredInfo;
  815.         return $this;
  816.     }
  817.     public function getPostMortemReport(): ?PostMortemReport
  818.     {
  819.         return $this->postMortemReport;
  820.     }
  821.     public function setPostMortemReport(?PostMortemReport $postMortemReport): self
  822.     {
  823.         if ($postMortemReport === null && $this->postMortemReport !== null) {
  824.             $this->postMortemReport->setCase(null);
  825.         }
  826.         if ($postMortemReport !== null && $postMortemReport->getCase() !== $this) {
  827.             $postMortemReport->setCase($this);
  828.         }
  829.         $this->postMortemReport $postMortemReport;
  830.         return $this;
  831.     }
  832.     public function getDeathCertificate(): ?DeathCertificate
  833.     {
  834.         return $this->deathCertificate;
  835.     }
  836.     public function setDeathCertificate(DeathCertificate $deathCertificate): self
  837.     {
  838.         if ($deathCertificate->getCase() !== $this) {
  839.             $deathCertificate->setCase($this);
  840.         }
  841.         $this->deathCertificate $deathCertificate;
  842.         return $this;
  843.     }
  844.     public function getBirthCertificate(): ?BirthCertificate
  845.     {
  846.         return $this->birthCertificate;
  847.     }
  848.     public function setBirthCertificate(BirthCertificate $birthCertificate): self
  849.     {
  850.         if ($birthCertificate->getCase() !== $this) {
  851.             $birthCertificate->setCase($this);
  852.         }
  853.         $this->birthCertificate $birthCertificate;
  854.         return $this;
  855.     }
  856. }