/** * Create a NGAP acte * * @param String[] $data Data with fiel and value * @param CMbObject $object Reference object * @param String $praticien_id Praticen id * * @return CActeNGAP */ function createActeNGAP($data, $object, $praticien_id) { $ngap = new CActeNGAP(); $ngap->code = $data["code"]; $ngap->coefficient = $data["coefficient"]; $ngap->quantite = $data["quantite"] ? $data["quantite"] : 1; $ngap->numero_dent = $data["numero_dent"]; $ngap->comment = $data["comment"]; $ngap->montant_depassement = $data["montantDepassement"]; $ngap->numero_forfait_technique = $data["numeroForfaitTechnique"]; $ngap->numero_agrement = $data["numeroAgrementAppareil"]; $ngap->minor_coef = $data["minor_coef"]; $ngap->minor_pct = $data["minor_pct"]; $ngap->major_coef = $data["major_coef"]; $ngap->major_pct = $data["major_pct"]; $ngap->facturable = $data["facturable"] ? $data["facturable"] == "non" ? "0" : "1" : "1"; $ngap->rapport_exoneration = $data["rapportExoneration"]; $date = $data["date"]; $heure = $data["heure"]; if (!$heure) { $heure = $this->getHourWithObject($object); } else { $heure = CMbDT::transform(null, $heure, "%H:%M:%S"); } $ngap->execution = "{$date} {$heure}"; $complement = null; if ($data["executionNuit"] && $data["executionNuit"] !== "non") { $complement = "N"; } if ($data["executionDimancheJourFerie"] && $data["executionDimancheJourFerie"] !== "non") { $complement = "F"; } $ngap->complement = $complement; $ngap->setObject($object); $ngap->executant_id = $praticien_id; return $ngap; }