Scenario
The patient address is maintainned in the hospital master records and also in the PMD. The data need to be compared and verified so that the address in both the records are correct.
Operation
With Xquery, we can join two XML documents to extract and/or compare information. The patient_details tables contain the address in XML format with patient ID as attribute. The PMD also stores the patient information which is in the out_patient_data table. By joining these two XML using the patient id as the key we can fetch the patient complete information including the address.
Solution
The address of the patient in patient master and the PMD document are displayed to the user for verification.