GG7SYT - add labeling to lis

This commit is contained in:
sas.fajri
2026-07-02 10:18:49 +07:00
parent b8b4c11f73
commit b42ee2067c
5 changed files with 51 additions and 51 deletions

View File

@@ -62,8 +62,8 @@ class Apilis
T_OrderHeaderLabNumber AS visitNumber,
M_PatientNoreg AS patientId,
M_PatientName AS patientName,
IF(LOWER(M_PatientGender) = 'male', 'L', 'P') AS sexId,
IF(LOWER(M_PatientGender) = 'male', 'Male', 'Female') AS sexName,
IF(LOWER(M_PatientGender) = 'male', 'L', IF(LOWER(M_PatientGender) = 'female', 'P', 'O')) AS sexId,
IF(LOWER(M_PatientGender) = 'male', 'Male', IF(LOWER(M_PatientGender) = 'female', 'Female', 'Other')) AS sexName,
REPLACE(M_PatientDOB, '-', '/') AS dob,
IFNULL(M_TitleName,'') as titleName,
'' AS pob,
@@ -86,8 +86,8 @@ class Apilis
M_BranchName AS guarantorName,
'Cp1' AS agreementId,
'CpOne' AS agreementName,
'' as serviceUnitId,
'' as serviceUnitName,
'MCU' as serviceUnitId,
'MCU Onsite' as serviceUnitName,
'' as wardPoliId,
'' as wardPoliName,
'' as roomId,
@@ -124,7 +124,7 @@ class Apilis
JOIN
t_test ON T_OrderDetailT_TestID = T_TestID
AND T_TestIsPrice = 'Y'
AND T_TestNat_GroupID = 1
AND ( T_TestNat_GroupID = 1 OR T_TestNat_GroupID = 7)
LEFT JOIN nat_testrefer ON Nat_TestReferNat_TestID = T_TestNat_TestID AND Nat_TestReferIsActive = 'Y' AND Nat_TestReferM_BranchID = M_BranchID
LEFT JOIN nat_testmap ON T_TestNat_TestID = Nat_TestMapNat_TestID
AND Nat_TestMapIsActive = 'Y'
@@ -143,8 +143,8 @@ class Apilis
T_OrderHeaderLabNumber AS visitNumber,
M_PatientNoreg AS patientId,
M_PatientName AS patientName,
IF(LOWER(M_PatientGender) = 'male', 'L', 'P') AS sexId,
IF(LOWER(M_PatientGender) = 'male', 'Male', 'Female') AS sexName,
IF(LOWER(M_PatientGender) = 'male', 'L', IF(LOWER(M_PatientGender) = 'female', 'P', 'O')) AS sexId,
IF(LOWER(M_PatientGender) = 'male', 'Male', IF(LOWER(M_PatientGender) = 'female', 'Female', 'Other')) AS sexName,
REPLACE(M_PatientDOB, '-', '/') AS dob,
IFNULL(M_TitleName,'') as titleName,
'' AS pob,
@@ -159,7 +159,7 @@ class Apilis
'' as idSIM,
'' as idPassport,
M_DoctorCode AS physicianId,
M_DoctorName AS physicianName,
CONCAT(IFNULL(M_DoctorPrefix,''),IFNULL(M_DoctorPrefix2,''),' ',M_DoctorName,' ',IFNULL(M_DoctorSuffix,''),IFNULL(M_DoctorSuffix2,'')) AS physicianName,
'' as isCito,
'' as diagnoseId,
T_OrderHeaderDiagnose as diagnoseName,
@@ -167,8 +167,8 @@ class Apilis
CorporateName AS guarantorName,
'Cp1' AS agreementId,
'CpOne' AS agreementName,
'' as serviceUnitId,
'' as serviceUnitName,
'WI' as serviceUnitId,
'Walk In' as serviceUnitName,
'' as wardPoliId,
'' as wardPoliName,
'' as roomId,
@@ -209,7 +209,7 @@ class Apilis
JOIN
t_test ON T_OrderDetailT_TestID = T_TestID
AND T_TestIsPrice = 'Y'
AND T_TestNat_GroupID = 1
AND T_TestNat_GroupID IN (1,6,7)
LEFT JOIN nat_testrefer ON Nat_TestReferNat_TestID = T_TestNat_TestID AND Nat_TestReferIsActive = 'Y' AND Nat_TestReferM_BranchID = M_BranchID
LEFT JOIN nat_testmap ON T_TestNat_TestID = Nat_TestMapNat_TestID
AND Nat_TestMapIsActive = 'Y'