Update Enfermera.php
This commit is contained in:
@@ -127,24 +127,8 @@ class Enfermera {
|
||||
p.tipo_documento AS paciente_tipo_documento,
|
||||
p.numero_documento AS paciente_numero_documento,
|
||||
p.eps AS paciente_eps,
|
||||
COALESCE(
|
||||
om.local_file,
|
||||
(SELECT om2.local_file
|
||||
FROM lab_ordenes_medicas om2
|
||||
WHERE om2.paciente_id = p.id
|
||||
AND om2.local_file IS NOT NULL
|
||||
ORDER BY om2.created_at DESC
|
||||
LIMIT 1)
|
||||
) AS orden_local_file,
|
||||
COALESCE(
|
||||
d.orden_id,
|
||||
(SELECT om2.id
|
||||
FROM lab_ordenes_medicas om2
|
||||
WHERE om2.paciente_id = p.id
|
||||
AND om2.local_file IS NOT NULL
|
||||
ORDER BY om2.created_at DESC
|
||||
LIMIT 1)
|
||||
) AS orden_id_display,
|
||||
om.local_file AS orden_local_file,
|
||||
d.orden_id AS orden_id_display,
|
||||
a.estado AS asignacion_estado,
|
||||
a.id AS asignacion_id,
|
||||
d.creado_por
|
||||
|
||||
Reference in New Issue
Block a user