Ejemplo n.º 1
0
        public POCD_MT000040Component2 ToPocdComponent()
        {
            POCD_MT000040Component2 returnVal = new POCD_MT000040Component2();

            POCD_MT000040NonXMLBody item = new POCD_MT000040NonXMLBody();

            item.text = new ED()
            {
                mediaType = "text/plain", representation = BinaryDataEncoding.B64
            };

            if (!string.IsNullOrWhiteSpace(this.ReportText))
            {
                // NOTE: Spec indicates base 64; but encoding as such makes in unreadable
                //       For now keep it legible

                //var bytes = UTF8Encoding.UTF8.GetBytes(this.ReportText);

                //string b64 = Convert.ToBase64String(bytes);

                item.text.Text = new string[] { this.ReportText };
            }

            returnVal.Item = item;

            return(returnVal);
        }
Ejemplo n.º 2
0
        /// MDHT operation: returns all sections
        public List <POCD_MT000040Section> getAllSections(POCD_MT000040ClinicalDocument clinicalDocument)
        {
            List <POCD_MT000040Section> allSections = new List <POCD_MT000040Section>();
            POCD_MT000040Component2     component2  = clinicalDocument.component;

            if (component2 != null)
            {
                POCD_MT000040StructuredBody structuredBody = component2.structuredBody;
                if (structuredBody != null)
                {
                    foreach (POCD_MT000040Component3 component3 in structuredBody.component)
                    {
                        POCD_MT000040Section section = component3.section;
                        if (section != null)
                        {
                            allSections.AddRange(getSections(section));
                        }
                    }
                }
            }
            return(allSections);
        }