Exemplo n.º 1
0
        public RawAplDocument ToRawDocument()
        {
            RawAplDocument returnDoc = new RawAplDocument();

            // *** Get base type ***
            POCD_MT000040ClinicalDocument arg = returnDoc as POCD_MT000040ClinicalDocument;

            // *** Populate from base ***
            arg = this.AddRawDocumentData(arg);

            // *** This is the list of body sections
            List <POCD_MT000040Component3> components = new List <POCD_MT000040Component3>();

            // *** After all sections are added, add as array ***
            POCD_MT000040StructuredBody body = arg.component.Item as POCD_MT000040StructuredBody;

            // *** Add existing ***
            components.AddRange(body.component);

            // *** Add lab results ***
            foreach (var section in this.Sections)
            {
                POCD_MT000040Component3 labResults = section.ToPocdComponent();
                if (labResults != null)
                {
                    components.Add(labResults);
                }
            }

            body.component = components.ToArray();
            return(returnDoc);
        }
Exemplo n.º 2
0
        public static string SerializeApl(RawAplDocument rawApl)
        {
            string returnVal = "";

            // *** Create serializer for specific document ***
            XmlSerializer serializer = new XmlSerializer(typeof(RawAplDocument));

            returnVal = SerializeIheDoc(serializer, rawApl);

            return(returnVal);
        }