Open jesusitd opened 3 years ago
Previous SQL:
SELECT
cases.id AS `Case ID`
, id_intake_hernia_mesh.hernia_mesh_original_implant_hernia_type AS `Hernia Types`
FROM
cases
INNER JOIN id_intake_hernia_mesh ON
cases.id = id_intake_hernia_mesh.case_id
AND id_intake_hernia_mesh.deleted = 0
AND id_intake_hernia_mesh.hernia_mesh_original_implant_hernia_type IS NOT NULL
WHERE
cases.deleted = 0;
Proposed SQL: (this field is more complete that the previous one)
SELECT
cases.id AS `Case ID`
, id_intake_hernia_mesh.hernia_mesh_implant_facility_hernia_type AS `Hernia Types`
FROM
cases
INNER JOIN id_intake_hernia_mesh ON
cases.id = id_intake_hernia_mesh.case_id
AND id_intake_hernia_mesh.deleted = 0
AND id_intake_hernia_mesh.hernia_mesh_implant_facility_hernia_type IS NOT NULL
WHERE
cases.deleted = 0;
However, this is still not considering the Multiple Hernia Types over the facilities and if this specific hernia type had a revision! (2nd stage maybe?)
DONE Rosen DONE Rosen Paralegal
Monitoring, close by 9/15/2020.