fix location data to array
This commit is contained in:
parent
8ef7b0a61a
commit
d1f91e30ba
@ -21,7 +21,7 @@ class Location extends Controller {
|
||||
->select("l.LocationID, LocCode, Parent, LocFull, LocType, v.VDesc ")
|
||||
->join("locationaddress la", "l.LocationID=la.LocationID")
|
||||
->join("valueset v", "v.VSetID=12 and v.VValue=l.LocType")
|
||||
->get()->getRowArray();
|
||||
->get()->getResultArray();
|
||||
|
||||
if (empty($rows)) {
|
||||
return $this->respond([
|
||||
|
||||
@ -17,13 +17,13 @@ class Occupation extends Controller {
|
||||
}
|
||||
|
||||
public function index() {
|
||||
$rows = $this->db->table('occupation')->select("*")->get()->getRowArray();
|
||||
$rows = $this->db->table('occupation')->select("*")->get()->getResultArray();
|
||||
|
||||
if (empty($rows)) {
|
||||
return $this->respond([
|
||||
'status' => 'success',
|
||||
'message' => "no Data.",
|
||||
'data' => $rows,
|
||||
'data' => [],
|
||||
], 200);
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ class Occupation extends Controller {
|
||||
}
|
||||
|
||||
public function show($OccupationID = null) {
|
||||
$rows=$this->db->table('occupation')->select("*")->where('occupationID', (int) $OccupationID)->get()->getRowArray();
|
||||
$rows=$this->db->table('occupation')->select("*")->where('occupationID', (int) $OccupationID)->get()->getResultArray();
|
||||
|
||||
if (empty($rows)) {
|
||||
return $this->respond([
|
||||
|
||||
@ -39,7 +39,7 @@ class PatVisit extends Controller {
|
||||
$data = [
|
||||
"InternalPVID" => $input['InternalPVID'] ?? null,
|
||||
"InternalPID" => $input['InternalPID'] ?? null,
|
||||
"Code" => $input['Code'] ?? null,
|
||||
"ADTCode" => $input['ADTCode'] ?? null,
|
||||
"LocationID" => $input['LocationID'] ?? null,
|
||||
"AttDoc" => $input['AttDoc'] ?? null,
|
||||
"RefDoc" => $input['RefDoc'] ?? null,
|
||||
@ -55,7 +55,7 @@ class PatVisit extends Controller {
|
||||
$row = $this->db->table('patvisit pv')
|
||||
->join('patdiag pd', 'pd.InternalPVID=pv.Internal.PVID', 'left')
|
||||
->join('patvisitadt pva', 'pd.InternalPVID=pva.InternalPVID', 'left')
|
||||
->get()->getRowArray();
|
||||
->get()->getResultArray();
|
||||
|
||||
return $this->respond([
|
||||
'status' => 'success',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user