This is a custom sql diagnosis report that i had written. See if it works for you. It does’t consider the attributes like Presumed/Confirmed , Primary/Secondary. If it doesn’t work as is, it could act as a starting point
The concept ids are hardcoded, you might want to update them as per your implementation or remove the hardcoding.