Fixed repo name typo
This commit is contained in:
parent
cb405a8c78
commit
16e8b565f8
@ -1,3 +1,3 @@
|
||||
# catterpillar
|
||||
# caterpillar
|
||||
|
||||
Web Application to get medicines information from barcode using open data
|
2
TODO
Normal file
2
TODO
Normal file
@ -0,0 +1,2 @@
|
||||
- Create data bulk SQL import
|
||||
- Create all mecine doctrine entities
|
@ -13,3 +13,9 @@
|
||||
docker-compose build
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
For a one-liner
|
||||
|
||||
```bash
|
||||
docker-compose up -d --build
|
||||
```
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ApiPlatform\Metadata\ApiResource;
|
||||
use ApiPlatform\Metadata\Link;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
@ -9,7 +10,6 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
* i.e. "comprime secable voie orale" for instance
|
||||
*/
|
||||
#[ORM\Entity]
|
||||
#[ApiResource]
|
||||
class MedicineAdministrationWay
|
||||
{
|
||||
#[ORM\Id, ORM\Column,ORM\GeneratedValue]
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
use ApiPlatform\Metadata\ApiResource;
|
||||
use ApiPlatform\Metadata\Link;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* A medicine holder (titulaire of an AMM).
|
||||
*/
|
||||
#[ORM\Entity]
|
||||
#[ApiResource]
|
||||
class MedicineHolder
|
||||
{
|
||||
#[ORM\Id]
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ApiPlatform\Metadata\ApiResource;
|
||||
use ApiPlatform\Metadata\Link;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
@ -14,6 +15,41 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
*/
|
||||
#[ORM\Entity]
|
||||
#[ApiResource]
|
||||
#[ApiResource(
|
||||
uriTemplate: '/medicine/'
|
||||
)]
|
||||
#[ApiResource(
|
||||
uriTemplate: '/medicine/{CIS}',
|
||||
uriVariables: [
|
||||
'CIS' => new Link(fromClass: MedicineSpeciality::class, fromProperty: 'CIS'),
|
||||
]
|
||||
)]
|
||||
#[ApiResource(
|
||||
uriTemplate: '/medicine/{CIS}/holder',
|
||||
uriVariables: [
|
||||
'CIS' => new Link(fromClass: MedicineSpeciality::class, fromProperty: 'CIS'),
|
||||
]
|
||||
)]
|
||||
#[ApiResource(
|
||||
uriTemplate: '/medicine/{CIS}/holder/{id}',
|
||||
uriVariables: [
|
||||
'CIS' => new Link(fromClass: MedicineSpeciality::class, fromProperty: 'CIS'),
|
||||
'id' => new Link(fromClass: MedicineHolder::class, fromProperty: 'id'),
|
||||
]
|
||||
)]
|
||||
#[ApiResource(
|
||||
uriTemplate: '/medicine/{CIS}/way',
|
||||
uriVariables: [
|
||||
'CIS' => new Link(fromClass: MedicineSpeciality::class, fromProperty: 'CIS'),
|
||||
]
|
||||
)]
|
||||
#[ApiResource(
|
||||
uriTemplate: '/medicine/{CIS}/way/{id}',
|
||||
uriVariables: [
|
||||
'CIS' => new Link(fromClass: MedicineSpeciality::class, fromProperty: 'CIS'),
|
||||
'id' => new Link(fromClass: MedicineAdministrationWay::class, fromProperty: 'id'),
|
||||
]
|
||||
)]
|
||||
class MedicineSpeciality
|
||||
{
|
||||
|
||||
@ -104,4 +140,148 @@ class MedicineSpeciality
|
||||
// {
|
||||
|
||||
// }
|
||||
|
||||
public function getCIS(): ?int
|
||||
{
|
||||
return $this->CIS;
|
||||
}
|
||||
|
||||
public function getDenomination(): ?string
|
||||
{
|
||||
return $this->denomination;
|
||||
}
|
||||
|
||||
public function getForm(): ?string
|
||||
{
|
||||
return $this->form;
|
||||
}
|
||||
|
||||
public function getMarketAuthStatus(): ?string
|
||||
{
|
||||
return $this->market_auth_status;
|
||||
}
|
||||
|
||||
public function getMarketAuthProcessType(): ?string
|
||||
{
|
||||
return $this->market_auth_process_type;
|
||||
}
|
||||
|
||||
public function getMarketAuthDate(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->market_auth_date;
|
||||
}
|
||||
|
||||
public function getMarketStatus(): ?string
|
||||
{
|
||||
return $this->market_status;
|
||||
}
|
||||
|
||||
public function getBdmStatus(): ?string
|
||||
{
|
||||
return $this->bdm_status;
|
||||
}
|
||||
|
||||
public function getEuropeanAuthCode(): ?int
|
||||
{
|
||||
return $this->european_auth_code;
|
||||
}
|
||||
|
||||
public function getEnforcedSurveillance(): ?string
|
||||
{
|
||||
return $this->enforced_surveillance;
|
||||
}
|
||||
|
||||
public function getWays(): iterable
|
||||
{
|
||||
return $this->ways;
|
||||
}
|
||||
|
||||
public function getHolders(): iterable
|
||||
{
|
||||
return $this->holders;
|
||||
}
|
||||
|
||||
public function setCIS(?int $CIS): self
|
||||
{
|
||||
$this->CIS = $CIS;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setDenomination(?string $denomination): self
|
||||
{
|
||||
$this->denomination = $denomination;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setForm(?string $form): self
|
||||
{
|
||||
$this->form = $form;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setMarketAuthStatus(?string $market_auth_status): self
|
||||
{
|
||||
$this->market_auth_status = $market_auth_status;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setMarketAuthProcessType(?string $market_auth_process_type): self
|
||||
{
|
||||
$this->market_auth_process_type = $market_auth_process_type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setMarketAuthDate(?\DateTimeInterface $market_auth_date): self
|
||||
{
|
||||
$this->market_auth_date = $market_auth_date;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setMarketStatus(?string $market_status): self
|
||||
{
|
||||
$this->market_status = $market_status;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setBdmStatus(?string $bdm_status): self
|
||||
{
|
||||
$this->bdm_status = $bdm_status;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setEuropeanAuthCode(?int $european_auth_code): self
|
||||
{
|
||||
$this->european_auth_code = $european_auth_code;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setEnforcedSurveillance(?string $enforced_surveillance): self
|
||||
{
|
||||
$this->enforced_surveillance = $enforced_surveillance;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setWays(iterable $ways): self
|
||||
{
|
||||
$this->ways = $ways;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setHolders(iterable $holders): self
|
||||
{
|
||||
$this->holders = $holders;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user