Commit 787bc69f authored by Marc Ducobu's avatar Marc Ducobu
Browse files

Debug

parent dbe49ad0
......@@ -48,7 +48,7 @@ class LoadChapter extends AbstractFixture implements OrderedFixtureInterface
array("en" => "Eye", "slug" => "F"),
array("en" => "Ear", "slug" => "H"),
array("en" => "Cardiovascular", "slug" => "K"),
array("en" => "Musculoskeletal", "slug" => "K"),
array("en" => "Musculoskeletal", "slug" => "L"),
array("en" => "Neurological", "slug" => "N"),
array("en" => "Psychological", "slug" => "P"),
array("en" => "Respiratory", "slug" => "R"),
......@@ -59,9 +59,10 @@ class LoadChapter extends AbstractFixture implements OrderedFixtureInterface
array("en" => "Female Genital", "slug" => "X"),
array("en" => "Male Genital", "slug" => "Y"),
array("en" => "Social Problems", "slug" => "Z")
]
];
foreach ($chapters as $c) {
echo($c["en"]."\n");
$e = (new Chapter())
->setSlug($c["slug"])
->setName(array("en" => $c["en"]));
......
......@@ -147,8 +147,8 @@ $codes = [
["neo","B75","Tumeur bénigne/indét. sang/lymph."],
["inj","B76","Rupture traumat. de la rate"],
["inj","B77","Autre traumat. sang/lymph/rate"],
["con",","Anémie hémolytique héréditaire"],
["con",","Autre anom. congénitale sang/ lymph/rate"],
["con","B78","Anémie hémolytique héréditaire"],
["con","B79","Autre anom. congénitale sang/ lymph/rate"],
["oth","B80","Anémie par déficience en fer"],
["oth","B81","Anémie carence vit B12/ac. folique"],
["oth","B82","Autre anémie/indét."],
......@@ -770,16 +770,15 @@ $codes = [
];
foreach ($codes as $c) {
echo($c[1]."\n");
$e = (new Code())
->setCode($c[1])
->setChapter($this->addReference($c[1][0]))
->setComponent($this->addReference($c[0]))
->setChapter($this->getReference($c[1][0]))
->setComponent($this->getReference($c[0]))
->setName(array("en" => $c[2]));
$manager->persist($e);
}
$manager->persist($customField);
$manager->flush();
}
......
......@@ -29,7 +29,7 @@ use Chill\ICPC2Bundle\Entity\Component;
/**
* Load Component for Report into database
*/
class LoadChapter extends AbstractFixture implements OrderedFixtureInterface
class LoadComponent extends AbstractFixture implements OrderedFixtureInterface
{
public function getOrder()
{
......@@ -50,7 +50,8 @@ class LoadChapter extends AbstractFixture implements OrderedFixtureInterface
array("en" => "OTHER DIAGNOSES", "slug" => "oth"),
];
foreach ($chapters as $c) {
foreach ($components as $c) {
echo($c["en"]."\n");
$e = (new Component())
->setSlug($c["slug"])
->setName(array("en" => $c["en"]));
......
......@@ -14,10 +14,8 @@ Chill\ICPC2Bundle\Entity\Code:
name:
type: json_array
manyToOne:
user:
targetEntity: Chill\MainBundle\Entity\User
chapter:
targetEntity: Chill\ICPC2Bundle\Chapter
targetEntity: Chill\ICPC2Bundle\Entity\Chapter
component:
targetEntity: Chill\ICPC2Bundle\Component
targetEntity: Chill\ICPC2Bundle\Entity\Component
lifecycleCallbacks: { }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment