From 4b8d31f3a1fb57095d9208d7bbac013bae9dff0e Mon Sep 17 00:00:00 2001 From: mahdahar <89adham@gmail.com> Date: Wed, 11 Feb 2026 09:22:15 +0700 Subject: [PATCH 1/4] Simplify FullName to only include first, middle, and last name --- app/Models/Patient/PatientModel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Patient/PatientModel.php b/app/Models/Patient/PatientModel.php index 540cea5..95dc6a5 100644 --- a/app/Models/Patient/PatientModel.php +++ b/app/Models/Patient/PatientModel.php @@ -22,7 +22,7 @@ class PatientModel extends BaseModel { protected $deletedField = 'DelDate'; public function getPatients($filters = []) { - $qname = "CONCAT_WS(' ', IFNULL(Prefix,''), IFNULL(NameFirst,''), IFNULL(NameMiddle,''), IFNULL(NameLast,''), IFNULL(NameMaiden,''), IFNULL(Suffix,''))"; + $qname = "CONCAT_WS(' ', IFNULL(NameFirst,''), IFNULL(NameMiddle,''), IFNULL(NameLast,''))"; $this->select("InternalPID, PatientID, $qname as FullName, Sex, Birthdate, EmailAddress1 as Email, MobilePhone"); From 9769e1dfeae37bc1449c64a671c578f108918e0b Mon Sep 17 00:00:00 2001 From: mahdahar <89adham@gmail.com> Date: Wed, 11 Feb 2026 18:19:04 +0700 Subject: [PATCH 2/4] fix(areageo): use province_id parameter instead of Parent in getCities --- app/Controllers/AreaGeoController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Controllers/AreaGeoController.php b/app/Controllers/AreaGeoController.php index c2f1797..6fac970 100644 --- a/app/Controllers/AreaGeoController.php +++ b/app/Controllers/AreaGeoController.php @@ -40,7 +40,7 @@ class AreaGeoController extends BaseController { } public function getCities() { - $filter = [ 'Parent' => $this->request->getVar('Parent') ?? null ]; + $filter = [ 'Parent' => $this->request->getVar('province_id') ?? null ]; $rows = $this->model->getCities($filter); $transformed = array_map(function($row) { return ['value' => $row['AreaGeoID'], 'label' => $row['AreaName']]; From c19847a8122f5e936b9b6e12a1a18690844fd461 Mon Sep 17 00:00:00 2001 From: mahdahar <89adham@gmail.com> Date: Wed, 11 Feb 2026 18:22:36 +0700 Subject: [PATCH 3/4] refactor(routes): remove race/religion/ethnic/country routes, use /api/valueset instead --- app/Config/Routes.php | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 7cb4334..d2b2a52 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -73,25 +73,6 @@ $routes->group('api', function ($routes) { }); // Master Data - $routes->group('race', function ($routes) { - $routes->get('/', 'Race::index'); - $routes->get('(:num)', 'Race::show/$1'); - }); - - $routes->group('country', function ($routes) { - $routes->get('/', 'Country::index'); - $routes->get('(:num)', 'Country::show/$1'); - }); - - $routes->group('religion', function ($routes) { - $routes->get('/', 'Religion::index'); - $routes->get('(:num)', 'Religion::show/$1'); - }); - - $routes->group('ethnic', function ($routes) { - $routes->get('/', 'Ethnic::index'); - $routes->get('(:num)', 'Ethnic::show/$1'); - }); // Location $routes->group('location', function ($routes) { From c38f9d2f914aa58a65dd6faf90b98f448cf4347d Mon Sep 17 00:00:00 2001 From: mahdahar <89adham@gmail.com> Date: Thu, 12 Feb 2026 07:24:17 +0700 Subject: [PATCH 4/4] feat(patvisits): add index method for paginated patient visits listing --- .serena/project.yml | 32 ++++++++++++++------------ app/Controllers/PatVisitController.php | 14 +++++++++++ public/api-docs.yaml | 11 +++++++++ 3 files changed, 42 insertions(+), 15 deletions(-) diff --git a/.serena/project.yml b/.serena/project.yml index 02bc3e8..25a9e29 100644 --- a/.serena/project.yml +++ b/.serena/project.yml @@ -1,13 +1,17 @@ +# the name by which the project can be referenced within Serena +project_name: "clqms01-be" + + # list of languages for which language servers are started; choose from: # al bash clojure cpp csharp # csharp_omnisharp dart elixir elm erlang # fortran fsharp go groovy haskell # java julia kotlin lua markdown # matlab nix pascal perl php -# powershell python python_jedi r rego -# ruby ruby_solargraph rust scala swift -# terraform toml typescript typescript_vts vue -# yaml zig +# php_phpactor powershell python python_jedi r +# rego ruby ruby_solargraph rust scala +# swift terraform toml typescript typescript_vts +# vue yaml zig # (This list may be outdated. For the current list, see values of Language enum here: # https://github.com/oraios/serena/blob/main/src/solidlsp/ls_config.py # For some languages, there are alternative language servers, e.g. csharp_omnisharp, ruby_solargraph.) @@ -16,8 +20,8 @@ # - For JavaScript, use typescript # - For Free Pascal/Lazarus, use pascal # Special requirements: -# - csharp: Requires the presence of a .sln file in the project folder. -# - pascal: Requires Free Pascal Compiler (fpc) and optionally Lazarus. +# Some languages require additional setup/installations. +# See here for details: https://oraios.github.io/serena/01-about/020_programming-languages.html#language-servers # When using multiple languages, the first language server that supports a given file will be used for that file. # The first language is the default language and the respective language server will be used as a fallback. # Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored. @@ -81,15 +85,13 @@ read_only: false # * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store. excluded_tools: [] -# initial prompt for the project. It will always be given to the LLM upon activating the project -# (contrary to the memories, which are loaded on demand). -initial_prompt: "" -# the name by which the project can be referenced within Serena -project_name: "clqms01" - # list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default) included_optional_tools: [] +# fixed set of tools to use as the base tool set (if non-empty), replacing Serena's default set of tools. +# This cannot be combined with non-empty excluded_tools or included_optional_tools. +fixed_tools: [] + # list of mode names to that are always to be included in the set of active modes # The full set of modes to be activated is base_modes + default_modes. # If the setting is undefined, the base_modes from the global configuration (serena_config.yml) apply. @@ -105,6 +107,6 @@ base_modes: # This setting can, in turn, be overridden by CLI parameters (--mode). default_modes: -# fixed set of tools to use as the base tool set (if non-empty), replacing Serena's default set of tools. -# This cannot be combined with non-empty excluded_tools or included_optional_tools. -fixed_tools: [] +# initial prompt for the project. It will always be given to the LLM upon activating the project +# (contrary to the memories, which are loaded on demand). +initial_prompt: "" diff --git a/app/Controllers/PatVisitController.php b/app/Controllers/PatVisitController.php index bea238f..2e605a8 100644 --- a/app/Controllers/PatVisitController.php +++ b/app/Controllers/PatVisitController.php @@ -15,6 +15,20 @@ class PatVisitController extends BaseController { $this->model = new PatVisitModel(); } + public function index() { + try { + $page = $this->request->getVar('page') ?? 1; + $perPage = $this->request->getVar('per_page') ?? 50; + $rows = $this->model->paginate($perPage, 'default', $page); + $total = $this->model->countAllResults(false); + if($rows == []) { $message = "data not found"; } + else { $message = "data found"; } + return $this->respond(['status' => 'success', 'message'=> $message, 'data' => $rows, 'total' => $total, 'page' => $page, 'per_page' => $perPage ], 200); + } catch (\Exception $e) { + return $this->failServerError('Something went wrong '.$e->getMessage()); + } + } + public function show($PVID = null) { try { $row = $this->model->show($PVID); diff --git a/public/api-docs.yaml b/public/api-docs.yaml index 025d4af..144bbf3 100644 --- a/public/api-docs.yaml +++ b/public/api-docs.yaml @@ -1391,10 +1391,21 @@ paths: properties: status: type: string + message: + type: string data: type: array items: $ref: '#/components/schemas/PatientVisit' + total: + type: integer + description: Total number of records + page: + type: integer + description: Current page number + per_page: + type: integer + description: Number of records per page post: tags: [Patient Visits]