protected function execute(InputInterface $input, OutputInterface $output) { parent::execute($input, $output); $preg = new Pregnancy(); $preg->setEdd('20140809'); $preg->setEthnicity(1); $preg->setParity(0); $preg->setMaternalheight(166); $preg->setMaternalweight(60); $preg->setGrowchartversion('NL2013'); $measurement = new Measurement(); $measurement->setDate('20140809'); $measurement->setType('efw'); $measurement->setValue(3000); $preg->setMeasurements(array($measurement, $measurement)); $birth = new Birth(); $birth->setAntenataliugrdetection(false); $birth->setBabydob('20140809'); $preg->setBirth($birth); $chart = new Chart(); $chart->setFirstname('Test'); $chart->setHeight('750'); $chart->setLanguage('en_US'); $preg->setChart($chart); $baby = new Baby(); $baby->setBabygender('M'); $baby->setBabynr(1); $baby->setBabyName('Test baby'); $babies = array($baby, $baby); $preg->setBabies($babies); $pregnancies = array($preg, $preg); $res = $this->client->registerPregnancies($pregnancies); print_r($res); }
public function updateMeasurement(Measurement $measurement) { $growchartid = $measurement->getGrowchartid(); $measurementuuid = $measurement->getUuid(); $url = $this->buildQuery(sprintf('/xml/pregnancy/%s/measurement/%s', $growchartid, $measurementuuid)); return $this->doRequest($url, $measurement->getXmlPayload(), 'PUT'); }
protected function execute(InputInterface $input, OutputInterface $output) { parent::execute($input, $output); $growchartid = $input->getArgument('growchartid'); $uuid = $input->getArgument('measurementuuid'); $dialog = $this->getHelperSet()->get('dialog'); $measurementTypes = Measurement::getMeasurementTypes(); $typeindex = $dialog->select($output, '<info>Please select the measurement type, default is 0:</info>', $measurementTypes, 0); $type = $measurementTypes[$typeindex]; $date = $dialog->ask($output, '<info>Please entry the date (YYYYMMDD):</info>'); $value = $dialog->ask($output, '<info>Please entry the value:</info>'); $measurement = new Measurement(); $measurement->setType($type); $measurement->setDate($date); $measurement->setValue($value); $measurement->setGrowchartid($growchartid); $measurement->setUuid($uuid); try { $res = $this->client->updateMeasurement($measurement); } catch (Exception $ex) { $output->writeln('<error>' . $ex->getMessage() . '</error>'); exit; } $output->writeln($res); }
public function updateMeasurement(Measurement $measurement) { return $this->call('updateMeasurement', $measurement->getSoapParams()); }