Scenario

The doctor needs a report where on giving a particular symptom the report gives details of all patients having that symptom and their complete medical history. One patient can have many symptoms related to a disease, hence to fetch all patients having a particular symptom, need loop through each patient's PMD is needed and then repeat for all patients.

This report will help to group patient with similar symptoms and hence the doctor could identify how a patient could be treated by comparing with other patient who had similar symptom.

Operation

SQL cursors allow iteration through rows in table. Also it supports cursors on XQuery expressions. In the following scenario to get patients with a given symptom we can loop through the section use expression


Solution

All the patients who have a particular symptom is fetched and given as a consolidated report.