Update Patient create, perbaikan LinkTo
This commit is contained in:
parent
04eb38177e
commit
9ba5121cda
@ -81,13 +81,23 @@ class Patient extends Controller {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
if ($patient['LinkTo'] != null) {
|
||||||
|
|
||||||
|
$ids = explode(',', $patient['LinkTo']); // dari string jadi array
|
||||||
|
$patientLinkTo = $this->db->table('patient')
|
||||||
|
->select('InternalPID, PatientID')
|
||||||
|
->whereIn('InternalPID', $ids)
|
||||||
|
->get()
|
||||||
|
->getResultArray();
|
||||||
|
$patient["LinkTo"] = $patientLinkTo == [] ? null : $patientLinkTo;
|
||||||
|
}
|
||||||
|
|
||||||
$patidt = $this->db->table('patidt')
|
$patidt = $this->db->table('patidt')
|
||||||
->select('PatIdtID, IdentifierType, Identifier')
|
->select('PatIdtID, IdentifierType, Identifier')
|
||||||
->where('InternalPID', (int) $InternalPID)
|
->where('InternalPID', (int) $InternalPID)
|
||||||
->get()
|
->get()
|
||||||
->getResultArray();
|
->getResultArray();
|
||||||
|
$patient['Identity'] = $patidt == [] ? null : $patidt;
|
||||||
$patient['Identity'] = $patidt;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Data pasien ditemukan dan mengembalikan - success 200
|
// Data pasien ditemukan dan mengembalikan - success 200
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user