PortaVita MGRID database does exactly this job, but based on HL7 v3 templates. It allows storage of source documents, querying against Snomed CT etc on details and allows Full XML handling.
Vriendelijke groet,
Dr. William Goossen
Directeur Results 4 Care BV
+31654614458