예제 #1
0
        public void ChoiceInheritance()
        {
            string expectedXml = @"<ClinicalDocument xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xsi:type=""custom:ClinicalDocument"" classCode=""DOCCLIN"" moodCode=""EVN"" xmlns=""urn:hl7-org:v3"" xmlns:custom=""urn:custom""><component contextConductionInd=""true""><structuredBody xsi:type=""custom:StructuredBody""  classCode=""DOCBODY"" moodCode=""EVN""><custom:element value=""true""/></structuredBody></component></ClinicalDocument>";

            var document = new RMIM.UV.CDAr2.POCD_MT000040UV.ClinicalDocument
            {
                Component = new Component2
                {
                    BodyChoice = new StructuredBody
                    {
                        Element = true,
                    }
                }
            };

            XmlIsEquivalentAndDeserializable(expectedXml, document);
        }
예제 #2
0
        public void SimpleCustomInstance()
        {
            string expectedXml = @"<ClinicalDocument xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xsi:type=""custom:ClinicalDocument"" classCode=""DOCCLIN"" moodCode=""EVN"" xmlns=""urn:hl7-org:v3"" xmlns:custom=""urn:custom""><recordTarget xsi:type=""custom:RecordTarget"" typeCode=""RCT"" contextControlCode=""OP""><custom:element value=""true"" /></recordTarget></ClinicalDocument>";

            var document = new RMIM.UV.CDAr2.POCD_MT000040UV.ClinicalDocument
            {
                RecordTarget = new List <RMIM.UV.CDAr2.POCD_MT000040UV.RecordTarget>
                {
                    new RecordTarget
                    {
                        Element = true,
                    }
                }
            };

            XmlIsEquivalentAndDeserializable(expectedXml, document);
        }
예제 #3
0
        public void ChoiceInheritance()
        {
            string expectedXml = @"<ClinicalDocument xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xsi:type=""custom:ClinicalDocument"" classCode=""DOCCLIN"" moodCode=""EVN"" xmlns=""urn:hl7-org:v3"" xmlns:custom=""urn:custom""><component contextConductionInd=""true""><structuredBody xsi:type=""custom:StructuredBody""  classCode=""DOCBODY"" moodCode=""EVN""><custom:element value=""true""/></structuredBody></component></ClinicalDocument>";

            var document = new RMIM.UV.CDAr2.POCD_MT000040UV.ClinicalDocument
            {
                Component = new Component2
                {
                    BodyChoice = new StructuredBody
                    {
                        Element = true,
                    }
                }
            };

            XmlIsEquivalentAndDeserializable(expectedXml, document);
        }
예제 #4
0
        public void SimpleCustomInstance()
        {
            string expectedXml = @"<ClinicalDocument xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xsi:type=""custom:ClinicalDocument"" classCode=""DOCCLIN"" moodCode=""EVN"" xmlns=""urn:hl7-org:v3"" xmlns:custom=""urn:custom""><recordTarget xsi:type=""custom:RecordTarget"" typeCode=""RCT"" contextControlCode=""OP""><custom:element value=""true"" /></recordTarget></ClinicalDocument>";

            var document = new RMIM.UV.CDAr2.POCD_MT000040UV.ClinicalDocument
            {
                RecordTarget = new List<RMIM.UV.CDAr2.POCD_MT000040UV.RecordTarget>
                {
                    new RecordTarget
                    {
                          Element = true,
                    }
                }
            };

            XmlIsEquivalentAndDeserializable(expectedXml, document);
        }