예제 #1
0
        public XmlElement ToXmlElement(XmlHelper helper)
        {
            var xmlElement = helper.CreateElement(nameof(AboutIllnessModel).Replace("Model", string.Empty));

            xmlElement.AppendChild(helper.CreateElement(nameof(FirstOnsetDate), helper.TransformerDate(FirstOnsetDate)));
            xmlElement.AppendChild(helper.CreateElement(nameof(OnsetDescription), OnsetDescription));
            xmlElement.AppendChild(helper.CreateElement(nameof(LastMedicalConsultationDate), helper.TransformerDate(LastMedicalConsultationDate)));

            xmlElement.AppendChild(helper.CreateElement(nameof(PhysicianInfos), PhysicianInfos.Select(x => x.ToXmlElement(helper)).ToList()));

            xmlElement.AppendChild(helper.CreateElement(nameof(Diagnosis), Diagnosis));

            xmlElement.AppendChild(helper.CreateElement(nameof(HasFamilyMemberWithSameProblem), (HasFamilyMemberWithSameProblem == "O").ToString()));
            if (HasFamilyMemberWithSameProblem == "O")
            {
                xmlElement.AppendChild(helper.CreateElement(nameof(FamilyMembers), FamilyMembers.ToXmlElement(helper)));
            }

            return(xmlElement);
        }