Update Rules Patient Identity Fix Version
This commit is contained in:
parent
c388c03749
commit
5a3eb5a63d
@ -80,11 +80,11 @@ class Patient extends Controller {
|
|||||||
// Khusus untuk Override PATIDT
|
// Khusus untuk Override PATIDT
|
||||||
$type = $input['PatIdt']['IdentifierType'] ?? null;
|
$type = $input['PatIdt']['IdentifierType'] ?? null;
|
||||||
$identifierRulesMap = [
|
$identifierRulesMap = [
|
||||||
'KTP' => 'required|regex_match[/^[0-9]{16}$/]',
|
'KTP' => 'required|regex_match[/^[0-9]{16}$/]', // 16 pas digit numeric
|
||||||
'PASS' => 'required|regex_match[/^[A-Za-z0-9]{6,9}$/]',
|
'PASS' => 'required|regex_match[/^[A-Za-z0-9]{1,9}$/]', // alphanumeric max 9
|
||||||
'SSN' => 'required|regex_match[/^[0-9]{3}-[0-9]{2}-[0-9]{4}$/]',
|
'SSN' => 'required|regex_match[/^[0-9]{9}$/]', // numeric, pas 9 digit
|
||||||
'SIM' => 'required|regex_match[/^[A-Za-z0-9]{12,14}$/]',
|
'SIM' => 'required|regex_match[/^[0-9]{19,20}$/]', // numeric 19–20 digit
|
||||||
'KTAS' => 'required|regex_match[/^[A-Za-z0-9]{12,15}$/]',
|
'KITAS' => 'required|regex_match[/^[0-9]{11}$/]', // numeric, pas 11 digit
|
||||||
];
|
];
|
||||||
if ($type === null || $type === '') {
|
if ($type === null || $type === '') {
|
||||||
$identifierRule = 'permit_empty|max_length[255]';
|
$identifierRule = 'permit_empty|max_length[255]';
|
||||||
|
|||||||
@ -21,7 +21,7 @@ class PatientModel extends BaseModel {
|
|||||||
protected $deletedField = 'DelDate';
|
protected $deletedField = 'DelDate';
|
||||||
|
|
||||||
public function getPatients($filters = []) {
|
public function getPatients($filters = []) {
|
||||||
$qname = "LOWER(CONCAT_WS(' ', IFNULL(Prefix,''), IFNULL(NameFirst,''), IFNULL(NameMiddle,''), IFNULL(NameLast,''), IFNULL(NameMaiden,''), IFNULL(Suffix,'')))";
|
$qname = "CONCAT_WS(' ', IFNULL(Prefix,''), IFNULL(NameFirst,''), IFNULL(NameMiddle,''), IFNULL(NameLast,''), IFNULL(NameMaiden,''), IFNULL(Suffix,''))";
|
||||||
|
|
||||||
$this->select("InternalPID, PatientID, $qname as FullName, Gender, Birthdate, EmailAddress1 as Email, MobilePhone");
|
$this->select("InternalPID, PatientID, $qname as FullName, Gender, Birthdate, EmailAddress1 as Email, MobilePhone");
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user