fix location show
This commit is contained in:
parent
e6dbe3e951
commit
4db1a61e04
@ -41,8 +41,8 @@ class Location extends Controller {
|
||||
public function show($LocationID = null) {
|
||||
$rows = $this->db->table('location l')
|
||||
->select("l.*, la.*, v.*")
|
||||
->join("locationaddress la", "l.LocationID=la.LocationID")
|
||||
->join("valueset v", "v.VSetID=12 and v.VValue=l.loctype")
|
||||
->join("locationaddress la", "l.LocationID=la.LocationID", "left")
|
||||
->join("valueset v", "v.VSetID=12 and v.VValue=l.loctype", "left")
|
||||
->where('l.LocationID', (int) $LocationID)
|
||||
->get()->getResultArray();
|
||||
|
||||
|
||||
@ -11,13 +11,23 @@ class DummySeeder extends Seeder {
|
||||
['LocationID'=>1, 'LocCode'=>'QLOC', 'LocFull'=>'Dummy Location', 'LocType'=>'ROOM', 'Description'=>'Location made for dummy testing' ]
|
||||
];
|
||||
$this->db->table('location')->insertBatch($data);
|
||||
|
||||
// locationAddress
|
||||
$data = [
|
||||
['LocationID'=>1, 'Street1'=>'Jalan Nginden', 'Street2'=>'Intan Raya', 'City'=>'Surabaya', 'Province'=>'East Java', 'PostCode'=>'60222']
|
||||
];
|
||||
$this->db->table('locationaddress')->insertBatch($data);
|
||||
|
||||
// contact
|
||||
$data = [
|
||||
['ContactID'=>1, 'NameFirst'=>'Default', 'NameLast'=>'Doctor', 'Title'=>'', 'Initial'=>'DEFDOC', 'Birthdate'=>'', 'EmailAddress1'=>'', 'EmailAddress2'=>'',
|
||||
'Phone'=>'', 'MobilePhone1'=>'', 'MobilePhone2'=>'', 'Specialty'=>'', 'SubSpecialty'=>'' ]
|
||||
];
|
||||
$this->db->table('contact')->insertBatch($data);
|
||||
$data = [
|
||||
['ContactID'=>1, 'ContactCode'=>'QDOC', 'ContactEmail'=>'qdoc@email.com', 'OccupationID'=>'',
|
||||
'JobTitle'=>'', 'Department'=>'', 'ContactStartDate'=>'', 'ContactEndDate'=>'' ]
|
||||
];
|
||||
$this->db->table('contactdetail')->insertBatch($data);
|
||||
|
||||
// patient
|
||||
$data = [
|
||||
[ 'InternalPID'=>1, 'PatientID'=>'SMAJ1', 'NameFirst'=>'Dummy', 'NameLast' => 'Patient M', 'Gender'=>'1', 'BirthDate'=>'1991-09-09', 'Street_1'=>'Makati', 'IntCountryID'=>'105', 'EmailAddress1'=>'smaj1@5panda.id',
|
||||
@ -26,8 +36,6 @@ class DummySeeder extends Seeder {
|
||||
'RaceID'=>'1', 'ReligionID'=>'1', 'EthnicID'=>'1', 'DeathIndicator' => '0']
|
||||
];
|
||||
$this->db->table('patient')->insertBatch($data);
|
||||
|
||||
// patidt
|
||||
$data = [
|
||||
[ 'InternalPID'=>1, 'IdentifierType'=>'KTP', 'Identifier'=>'9901' ],
|
||||
[ 'InternalPID'=>2, 'IdentifierType'=>'KTP', 'Identifier'=>'9902' ]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user