public function getVisitCheckOutCharges(stdClass $params) { $invoice = array(); $insurance = $this->insurance->getPatientPrimaryInsuranceByPid($params->pid); if ($insurance !== false) { $invoice[] = array('code' => 'COPAY', 'name' => 'COPAY', 'amountOriginal' => $insurance['copay'], 'amount' => $insurance['copay']); } else { $services = $this->services->getCptByEid($params->eid); foreach ($services['rows'] as $service) { $row['code'] = $service['code']; $row['name'] = $service['code_text_medium']; $row['amountOriginal'] = $service['status'] == 0 ? '00.00' : $service['charge']; $row['amount'] = $row['amountOriginal']; $invoice[] = $row; } } return $invoice; }
public function getEncounterCodesByEid($eid) { $records = array(); foreach ($this->diagnosis->getICDByEid($eid) as $fo) { $fo['type'] = 'ICD'; $records[] = $fo; } $foo = $this->services->getCptByEid($eid); foreach ($foo['rows'] as $fo) { $fo['type'] = 'CPT'; $records[] = $fo; } $foo = $this->services->getHCPCByEid($eid); foreach ($foo['rows'] as $fo) { $fo['type'] = 'HCPC'; $records[] = $fo; } return $records; }