2025-06-26 14:09:25 +07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use CodeIgniter\Router\RouteCollection;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @var RouteCollection $routes
|
|
|
|
|
*/
|
2025-09-19 16:42:27 +07:00
|
|
|
$routes->options('(:any)', function() { return ''; });
|
2025-07-14 16:45:59 +07:00
|
|
|
$routes->get('/', 'Home::index');
|
2025-06-26 14:09:25 +07:00
|
|
|
|
2025-10-10 10:19:52 +07:00
|
|
|
// Faker
|
|
|
|
|
$routes->get('faker/faker-patient/(:num)', 'faker\FakerPatient::sendMany/$1');
|
|
|
|
|
|
2025-09-04 09:42:30 +07:00
|
|
|
$routes->group('api', ['filter' => 'auth'], function($routes) {
|
2025-09-09 09:16:35 +07:00
|
|
|
$routes->get('dashboard', 'Dashboard::index');
|
|
|
|
|
$routes->get('result', 'Result::index');
|
|
|
|
|
$routes->get('sample', 'Sample::index');
|
2025-09-04 09:42:30 +07:00
|
|
|
});
|
|
|
|
|
|
2025-09-08 13:33:48 +07:00
|
|
|
$routes->post('/api/auth/login', 'Auth::login');
|
|
|
|
|
$routes->post('/api/auth/change_pass', 'Auth::change_pass');
|
|
|
|
|
$routes->post('/api/auth/register', 'Auth::register');
|
|
|
|
|
$routes->get('/api/auth/check', 'Auth::checkAuth');
|
|
|
|
|
$routes->post('/api/auth/logout', 'Auth::logout');
|
2025-07-02 16:10:37 +07:00
|
|
|
|
2025-10-16 10:28:40 +07:00
|
|
|
$routes->get('/api/patient', 'Patient\Patient::index');
|
|
|
|
|
$routes->post('/api/patient', 'Patient\Patient::create');
|
|
|
|
|
$routes->get('/api/patient/(:num)', 'Patient\Patient::show/$1');
|
|
|
|
|
$routes->delete('/api/patient', 'Patient\Patient::delete');
|
|
|
|
|
$routes->patch('/api/patient', 'Patient\Patient::update');
|
|
|
|
|
$routes->get('/api/patient/check', 'Patient\Patient::patientCheck');
|
2025-07-18 14:38:32 +07:00
|
|
|
|
2025-10-16 12:55:55 +07:00
|
|
|
$routes->get('/api/patvisit', 'PatVisit::index');
|
2025-09-19 16:43:03 +07:00
|
|
|
$routes->post('/api/patvisit', 'PatVisit::create');
|
2025-09-22 13:25:31 +07:00
|
|
|
$routes->get('/api/patvisit/patient/(:num)', 'PatVisit::showByPatient/$1');
|
2025-10-21 09:55:28 +07:00
|
|
|
$routes->get('/api/patvisit/(:any)', 'PatVisit::show/$1');
|
2025-09-19 16:43:03 +07:00
|
|
|
$routes->delete('/api/patvisit', 'PatVisit::delete');
|
|
|
|
|
$routes->patch('/api/patvisit', 'PatVisit::update');
|
|
|
|
|
|
2025-08-01 11:37:03 +07:00
|
|
|
$routes->get('/api/race', 'Race::index');
|
2025-08-08 08:37:00 +07:00
|
|
|
$routes->get('/api/race/(:num)', 'Race::show/$1');
|
|
|
|
|
|
2025-08-01 11:37:03 +07:00
|
|
|
$routes->get('/api/country', 'Country::index');
|
2025-08-08 08:37:00 +07:00
|
|
|
$routes->get('/api/country/(:num)', 'Country::show/$1');
|
|
|
|
|
|
2025-08-01 11:37:03 +07:00
|
|
|
$routes->get('/api/religion', 'Religion::index');
|
2025-08-08 08:37:00 +07:00
|
|
|
$routes->get('/api/religion/(:num)', 'Religion::show/$1');
|
|
|
|
|
|
|
|
|
|
$routes->get('/api/ethnic', 'Ethnic::index');
|
2025-09-11 11:09:04 +07:00
|
|
|
$routes->get('/api/ethnic/(:num)', 'Ethnic::show/$1');
|
|
|
|
|
|
|
|
|
|
$routes->get('/api/location', 'Location::index');
|
|
|
|
|
$routes->get('/api/location/(:num)', 'Location::show/$1');
|
|
|
|
|
$routes->post('/api/location', 'Location::create');
|
2025-09-16 15:33:22 +07:00
|
|
|
$routes->patch('/api/location', 'Location::update');
|
2025-09-18 15:52:37 +07:00
|
|
|
$routes->delete('/api/location', 'Location::delete');
|
|
|
|
|
|
2025-10-16 11:09:36 +07:00
|
|
|
$routes->get('/api/contact', 'Contact\Contact::index');
|
|
|
|
|
$routes->get('/api/contact/(:num)', 'Contact\Contact::show/$1');
|
|
|
|
|
$routes->post('/api/contact', 'Contact\Contact::create');
|
|
|
|
|
$routes->patch('/api/contact', 'Contact\Contact::update');
|
2025-10-16 12:55:55 +07:00
|
|
|
$routes->delete('/api/contact', 'Contact\git Contact::delete');
|
2025-09-11 16:40:36 +07:00
|
|
|
|
2025-10-16 11:09:36 +07:00
|
|
|
$routes->get('/api/occupation', 'Contact\Occupation::index');
|
|
|
|
|
$routes->get('/api/occupation/(:num)', 'Contact\Occupation::show/$1');
|
|
|
|
|
$routes->post('/api/occupation', 'Contact\Occupation::create');
|
|
|
|
|
$routes->patch('/api/occupation', 'Contact\Occupation::update');
|
|
|
|
|
//$routes->delete('/api/occupation', 'Contact\Occupation::delete');
|
2025-09-11 16:40:36 +07:00
|
|
|
|
2025-10-14 16:54:43 +07:00
|
|
|
$routes->get('/api/valueset', 'ValueSet\ValueSet::index');
|
|
|
|
|
$routes->get('/api/valueset/(:num)', 'ValueSet\ValueSet::show/$1');
|
|
|
|
|
$routes->get('/api/valueset/valuesetdef/(:num)', 'ValueSet\ValueSet::showByValueSetDef/$1');
|
|
|
|
|
$routes->post('/api/valueset', 'ValueSet\ValueSet::create');
|
|
|
|
|
$routes->patch('/api/valueset', 'ValueSet\ValueSet::update');
|
|
|
|
|
$routes->delete('/api/valueset', 'ValueSet\ValueSet::delete');
|
|
|
|
|
|
|
|
|
|
$routes->get('/api/valuesetdef/', 'ValueSet\ValueSetDef::index');
|
|
|
|
|
$routes->get('/api/valuesetdef/(:num)', 'ValueSet\ValueSetDef::show/$1');
|
|
|
|
|
$routes->post('/api/valuesetdef', 'ValueSet\ValueSetDef::create');
|
|
|
|
|
$routes->patch('/api/valuesetdef', 'ValueSet\ValueSetDef::update');
|
|
|
|
|
$routes->delete('/api/valuesetdef', 'ValueSet\ValueSetDef::delete');
|
2025-09-23 15:57:19 +07:00
|
|
|
|
|
|
|
|
$routes->get('/api/counter/', 'Counter::index');
|
|
|
|
|
$routes->get('/api/counter/(:num)', 'Counter::show/$1');
|
|
|
|
|
$routes->post('/api/counter', 'Counter::create');
|
|
|
|
|
$routes->patch('/api/counter', 'Counter::update');
|
2025-10-14 10:48:20 +07:00
|
|
|
$routes->delete('/api/counter', 'Counter::delete');
|
|
|
|
|
|
|
|
|
|
$routes->get('/api/containerdef/', 'Specimen\ContainerDef::index');
|
|
|
|
|
$routes->get('/api/containerdef/(:num)', 'Specimen\ContainerDef::show/$1');
|
|
|
|
|
$routes->post('/api/containerdef', 'Specimen\ContainerDef::create');
|
|
|
|
|
$routes->patch('/api/containerdef', 'Specimen\ContainerDef::update');
|
2025-10-22 13:40:27 +07:00
|
|
|
$routes->delete('/api/containerdef', 'Specimen\ContainerDef::delete');
|
|
|
|
|
|
2025-10-23 09:41:49 +07:00
|
|
|
// Khusus
|
2025-10-22 13:40:27 +07:00
|
|
|
$routes->get('/api/zones', 'Zones::index');
|
2025-10-23 09:41:49 +07:00
|
|
|
$routes->get('/api/zones/synchronize', 'Zones::synchronize');
|
|
|
|
|
$routes->get('/api/zones/provinces', 'Zones::getProvinces');
|
|
|
|
|
$routes->get('/api/zones/cities', 'Zones::getCities');
|