XSLT: ranking of elements and computation

Frorcebrubbap

New Member
I apologize for being totally inexperienced with XML, but solving this problem will help me to understand how computation with XSLT works.We have a sample database structured like this:\[code\]<HospitalML><Patients> <Patient> <Name> <FirstName>Salvatore</FirstName> <LastName>Piscuoglio</LastName> </Name> <Diagnoses> <Diagnosis> <Name>HCC</Name> <Weight>1.2</Weight> </Diagnosis> <Diagnosis> <Name>CRC</Name> <Weight>2.2</Weight> </Diagnosis> </Diagnoses> </Patient></Patients><Hospitals> <Hospital> <HospitalName>LondonGeneral</HospitalName> <Diagnoses> <Diagnosis> <Name>HCC</Name> <Weight>2.1</Weight> </Diagnosis> <Diagnosis> <Name>CRC</Name> <Weight>0.2</Weight> </Diagnosis> </Diagnoses> </Hospital> <Hospital> <HospitalName>EastEnd</HospitalName> <Diagnoses> <Diagnosis> <Name>HCC</Name> <Weight>1.7</Weight> </Diagnosis> <Diagnosis> <Name>CRC</Name> <Weight>0.7</Weight> </Diagnosis> </Diagnoses> </Hospital></Hospitals>\[/code\]Each patient has a set of diagnoses with "weight" values indicating how severe they are. Each hospital element has "diagnoses"child elements indicating which diseases they manage and a "weight" element scores indicating how good they are at each. I would like to evaluate hospitals from the database for patient Salvatore and give a list of hospitals ranked up by scores indicating the best ones for his diagnoses.Would be grateful for any thoughts. Thanks.
 
Back
Top