Расширил должности врачей

This commit is contained in:
brusnitsyn
2026-07-13 14:02:19 +09:00
parent 33bc2d05e0
commit c3ad3ca9fd

View File

@@ -34,11 +34,23 @@ class DepartmentController extends Controller
$user = Auth::user();
$userDepartmentProfileId = $user->department->departmentType->department_type_id;
$departmentProfileToDoctorProfiles = [
1 => [1336, 1351, 1379, 1393, 1402, 1423, 1424, 1505]
];
// TODO: Возможно в будущем понадобится, пока вывожу все должности которые начинаются с Врач-
// $departmentProfileToDoctorProfiles = [
// 1 => [1336, 1351, 1379, 1393, 1402, 1423, 1424, 1505]
// ];
// Получаем ID профилей должностей для текущего типа отдела
$doctorProfileIds = $departmentProfileToDoctorProfiles[$userDepartmentProfileId] ?? [];
// $doctorProfileIds = $departmentProfileToDoctorProfiles[$userDepartmentProfileId] ?? [];
$doctorProfileIds = [
1325, 1326, 1327, 1328, 1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341,
1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358,
1359, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1371, 1372, 1373, 1374, 1375,
1376, 1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392,
1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409,
1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, 1436, 1437,
1440, 1460, 1493, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508,
1509, 1510, 1511, 1512, 1513, 1528, 1529, 1530, 1531, 1532, 1533, 1534, 1535, 1558, 1593, 1594, 1595,
1596, 1597, 1598, 1607, 1608, 1609, 1615, 1618, 1619, 1620, 1621, 1622, 1624, 1625, 1626
];
$departmentIds = $user->misDepartments->pluck('rf_mis_department_id')->toArray();
$doctorCacheKey = "doctors:duty:$userDepartmentProfileId";