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(); }
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"); }
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"); }
public void NullXmlShallRenturnNull() { var result = new CodingParser().FromXml(null); result.Should().BeNull(); }