예제 #1
0
        public void ElementWithoutCodeAttributeShallRenturnNull()
        {
            var xml =
                @"<code displayName=""Summarization of Episode Note"" codeSystem=""2.16.840.1.113883.6.1"" codeSystemName=""LOINC"" />";

            var element = XElement.Parse(xml);
            var result  = new CodingParser().FromXml(element);

            result.Should().BeNull();
        }
예제 #2
0
        public void ShallRenturnCoding()
        {
            var xml =
                @"<code code=""34133 - 9"" displayName=""Summarization of Episode Note"" codeSystem=""2.16.840.1.113883.6.1"" codeSystemName=""LOINC"" />";
            var element = XElement.Parse(xml);
            var result  = new CodingParser().FromXml(element);

            result.Should().NotBeNull();
            result.Code.Should().Be("34133 - 9");
            result.System.Should().Be("http://loinc.org");
            result.Display.Should().Be("Summarization of Episode Note");
        }
예제 #3
0
        public void ShallRenturnNullFlavor()
        {
            var xml =
                @"<code nullFlavor=""NI""/>";

            var element = XElement.Parse(xml);
            var result  = new CodingParser().FromXml(element);

            result.Should().NotBeNull();
            result.Code.Should().Be("NI");
            result.System.Should().Be("http://hl7.org/fhir/v3/NullFlavor");
        }
예제 #4
0
        public void NullXmlShallRenturnNull()
        {
            var result = new CodingParser().FromXml(null);

            result.Should().BeNull();
        }