private Ca.Infoway.Messagebuilder.Model.Ccda_r1_1.Consultationnote.Component2 CreateComponent()
        {
            StructuredBody body = new StructuredBody();

            body.Component.Add(CreateReasonForVisit());
            body.Component.Add(CreateGeneralStatus());

            Ca.Infoway.Messagebuilder.Model.Ccda_r1_1.Consultationnote.Component2 component = new Ca.Infoway.Messagebuilder.Model.Ccda_r1_1.Consultationnote.Component2();
            component.Component2Choice = body;
            return(component);
        }
Exemple #2
0
 private void RenderSections(ConsultationNote consultationNote)
 {
     if (consultationNote.Component != null)
     {
         Ca.Infoway.Messagebuilder.Model.Ccda_r1_1.Consultationnote.Component2 component = consultationNote.Component;
         if (component.HasComponent2ChoiceAsNonXMLBody())
         {
             // not much to render in this case
             NonXMLBody nonXmlBody = component.Component2ChoiceAsNonXMLBody;
             Console.WriteLine("Non-XML Body Text: ");
             RenderText(nonXmlBody.Text);
         }
         else if (component.HasComponent2ChoiceAsStructuredBody())
         {
             Ca.Infoway.Messagebuilder.Model.Ccda_r1_1.Consultationnote.StructuredBody structuredBody = component.Component2ChoiceAsStructuredBody;
             foreach (IComponent3Choice section in structuredBody.Component)
             {
                 RenderSection(section);
             }
         }
     }
 }