Mike, thanks for the answer. I'm not exactly sure what you mean by XSD. We are converting from one EHR to another and need to output 2-3 years of PAMI data. I can gather the info in M and store in a temp global but not sure if it would need to be stored with element tags or not and then output in CCDA format. They provided a schema file but not sure what to do with it. At the moment I am a bit confused. I've read the Intersystems documents but the examples don't shed much light on how it all fits together.....but that could just be me having not done anything with classes or schema before. Any help would be great.