public void IVLExampleTest02() { IVL <TS> currentlyOccuring = new IVL <TS>(DateTime.Now); currentlyOccuring.NullFlavor = NullFlavor.Other; Console.WriteLine(currentlyOccuring.ToString()); Assert.IsFalse(currentlyOccuring.Validate()); }
public void IVLExampleTest01() { // create new timestamp interval IVL <TS> currentlyOccuring = new IVL <TS>(DateTime.Now); currentlyOccuring.NullFlavor = null; Console.WriteLine(currentlyOccuring.ToString()); Assert.IsTrue(currentlyOccuring.Validate()); }
public void IVLNULLNullflavorHighLowIncludedHighIncludedWidthValidationTest() { IVL <INT> ivl = new IVL <INT>(); ivl.NullFlavor = null; ivl.High = null; ivl.LowClosed = null; ivl.HighClosed = null; ivl.Width = null; Assert.IsFalse(ivl.Validate()); }
public void ConstructingIVLTest01() { // Using low/high IVL <TS> janStart = new IVL <TS>( new TS(new DateTime(2012, 01, 01), DatePrecision.Day), new TS(new DateTime(2012, 01, 01), DatePrecision.Day) ); janStart.NullFlavor = null; Assert.IsTrue(janStart.Validate()); }
public void IVLValidationNULLNullflavorHighLowIncludedHighIncludedWidthPOPLowTest() { IVL <INT> ivl = new IVL <INT>(); ivl.NullFlavor = null; ivl.High = null; ivl.LowClosed = null; ivl.HighClosed = null; ivl.Width = null; ivl.Low = 0; Assert.IsTrue(ivl.Validate()); }
public void IVLValidationNULLHighLowIncludedHighIncludedWidthPOPNullflavorLowTest() { IVL <INT> ivl = new IVL <INT>(); ivl.High = null; ivl.LowClosed = null; ivl.HighClosed = null; ivl.Width = null; ivl.Low = 0; ivl.NullFlavor = NullFlavor.NotAsked; Assert.IsFalse(ivl.Validate()); }
public void IVLValidationNULLNullflavorLowLowIncludedHighIncludedPOPHighWidthTest() { IVL <INT> ivl = new IVL <INT>(); ivl.NullFlavor = null; ivl.Low = null; ivl.LowClosed = null; ivl.HighClosed = null; ivl.High = 10; ivl.Width = 5; Assert.IsTrue(ivl.Validate()); }//Should validate
public void ConstructingIVLTest02() { // Using low/width IVL <TS> janStartLow = new IVL <TS>() { Low = new TS(new DateTime(2012, 01, 01), DatePrecision.Day), Width = new PQ(15, "d") }; janStartLow.NullFlavor = null; Assert.IsTrue(janStartLow.Validate()); }
public void ConstructingIVLTest03() { // Using high/width IVL <TS> janStartHigh = new IVL <TS>() { Width = new PQ(15, "d"), High = new TS(new DateTime(2012, 01, 05), DatePrecision.Day) }; janStartHigh.NullFlavor = null; Assert.IsTrue(janStartHigh.Validate()); }
public void ConstructingIVLTest04() { // Using low IVL <TS> janStart = new IVL <TS>() { Low = new TS(new DateTime(2012, 01, 05), DatePrecision.Day), High = new TS(new DateTime(2012, 01, 05), DatePrecision.Day) }; janStart.NullFlavor = NullFlavor.Unknown; Assert.IsFalse(janStart.Validate()); }
public void ConstructingIVLTest05() { // Using low IVL <TS> janStart = new IVL <TS>() { LowClosed = true, //Low = new TS(new DateTime(2012, 01, 05), DatePrecision.Day), High = new TS(new DateTime(2012, 01, 05), DatePrecision.Day) }; Assert.IsFalse(janStart.Validate()); }
public void IVLValidationNULLNullflavorLowHighWidthPOPHighIncludedLowIncludedTest() { IVL <INT> ivl = new IVL <INT>(); ivl.NullFlavor = null; ivl.Low = null; ivl.High = null; ivl.Width = null; ivl.HighClosed = true; ivl.LowClosed = true; Assert.IsFalse(ivl.Validate()); }
public void IVLValidationNULLLowLowIncludedHighIncludedHighWidthValuePOPNullflavorTest() { IVL <INT> ivl = new IVL <INT>(); ivl.Low = null; ivl.LowClosed = null; ivl.HighClosed = null; ivl.High = null; ivl.Width = null; ivl.Value = null; ivl.NullFlavor = NullFlavor.NotAsked; Assert.IsTrue(ivl.Validate()); }
public void IVLValidationNULLNullflavorLowIncludedHighIncludedPOPLowHighWidthValueTest() { IVL <INT> ivl = new IVL <INT>(); ivl.Low = 0; ivl.LowClosed = null; ivl.HighClosed = null; ivl.High = 5; ivl.Width = 5; ivl.Value = 1; ivl.NullFlavor = null; Assert.IsTrue(ivl.Validate()); }
public void ConstructingIVLTest07() { // Using low IVL <TS> janStart = new IVL <TS>(); janStart.Value = null; janStart.NullFlavor = null; janStart.High = null; janStart.Low = null; janStart.HighClosed = null; janStart.LowClosed = null; Assert.IsFalse(janStart.Validate()); }
public void ConstructingIVLTest06() { // Using low IVL <TS> janStart = new IVL <TS>() { HighClosed = true, Low = new TS(new DateTime(2012, 01, 05), DatePrecision.Day), // High = new TS(new DateTime(2012, 01, 05), DatePrecision.Day) }; janStart.NullFlavor = null; Assert.IsFalse(janStart.Validate()); }
public void IvlToSetTest01() { IVL <INT> interval = new IVL <INT>(1, 10) { HighClosed = true }; foreach (var i in interval.ToSet()) { Console.WriteLine(i); } interval.NullFlavor = null; Assert.IsTrue(interval.Validate()); }
public void IVL_INTSerializationTest04() { IVL <INT> ivl = new IVL <INT>(null, 100) { Width = 90, HighClosed = true }; Assert.IsTrue(ivl.Validate()); var expectedXml = @"<test xmlns=""urn:hl7-org:v3"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" highClosed=""true""><high value=""100""/><width value=""90""/></test>"; var actualXml = R2SerializationHelper.SerializeAsString(ivl); R2SerializationHelper.XmlIsEquivalent(expectedXml, actualXml); }
public void IVL_TSSerializationTest03() { IVL <TS> ivl = new IVL <TS>( null, // low new TS(new DateTime(2008, 01, 31), DatePrecision.Day) // high ); ivl.Width = new PQ(1, "w"); ivl.HighClosed = true; Assert.IsTrue(ivl.Validate()); var expectedXml = @"<test xmlns=""urn:hl7-org:v3"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" highClosed=""true""><high value=""20080131""/><width value=""1"" unit=""w""/></test>"; var actualXml = R2SerializationHelper.SerializeAsString(ivl); R2SerializationHelper.XmlIsEquivalent(expectedXml, actualXml); }
public void IVL_PQParseTest02() { IVL <PQ> ivl = new IVL <PQ>( new PQ(1, "s"), new PQ(10, "s") ); ivl.ValidTimeLow = new TS(new DateTime(2008, 01, 01), DatePrecision.Day); ivl.ValidTimeHigh = new TS(new DateTime(2008, 01, 31), DatePrecision.Day); ivl.UpdateMode = UpdateMode.Add; ivl.Width = null; ivl.NullFlavor = null; ivl.OriginalText = "Test"; // normalize the ivl expression Assert.IsTrue(ivl.Validate()); var actualXml = R2SerializationHelper.SerializeAsString(ivl); var ivl2 = R2SerializationHelper.ParseString <IVL <PQ> >(actualXml); Assert.AreEqual(ivl, ivl2); }
public void IVL_PQSerializationTest01() { IVL <PQ> ivl = new IVL <PQ>( new PQ(1, "s"), new PQ(10, "s") ); ivl.LowClosed = true; ivl.HighClosed = true; ivl.ValidTimeLow = null;; ivl.ValidTimeHigh = null; ivl.UpdateMode = null; ivl.Width = null; ivl.NullFlavor = null; Assert.IsTrue(ivl.Validate()); var expectedXml = @"<test xmlns=""urn:hl7-org:v3"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" lowClosed=""true"" highClosed=""true""><low value=""1"" unit=""s"" /><high value=""10"" unit=""s""/></test>"; var actualXml = R2SerializationHelper.SerializeAsString(ivl); R2SerializationHelper.XmlIsEquivalent(expectedXml, actualXml); }
public void IVL_PQParseTest01() { IVL <PQ> ivl = new IVL <PQ>( new PQ(1, "s"), new PQ(10, "s") ); ivl.Width = new PQ(1, "w"); ivl.HighClosed = true; ivl.ValidTimeLow = null;; ivl.ValidTimeHigh = null; ivl.UpdateMode = null; ivl.Width = null; ivl.NullFlavor = null; // normalize the ivl expression Assert.IsTrue(ivl.Validate()); var actualXml = R2SerializationHelper.SerializeAsString(ivl); var ivl2 = R2SerializationHelper.ParseString <IVL <PQ> >(actualXml); Assert.AreEqual(ivl, ivl2); }
public void IVL_PQSerializationTest02() { IVL <PQ> ivl = new IVL <PQ>( new PQ(1, "s"), new PQ(10, "s") ); ivl.ValidTimeLow = new TS(new DateTime(2008, 01, 01), DatePrecision.Day); ivl.ValidTimeHigh = new TS(new DateTime(2008, 01, 31), DatePrecision.Day); ivl.UpdateMode = UpdateMode.Add; ivl.LowClosed = true; ivl.HighClosed = true; ivl.Width = null; ivl.OriginalText = "Test"; ivl.NullFlavor = null; Assert.IsTrue(ivl.Validate()); var expectedXml = @"<test xmlns=""urn:hl7-org:v3"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" lowClosed=""true"" highClosed=""true"" validTimeLow=""20080101"" validTimeHigh=""20080131"" updateMode=""A""><originalText language=""en-US"" value=""Test"" /><low value=""1"" unit=""s"" /><high value=""10"" unit=""s"" /></test>"; var actualXml = R2SerializationHelper.SerializeAsString(ivl); R2SerializationHelper.XmlIsEquivalent(expectedXml, actualXml); }
public void IVL_INTSerializationTest04() { IVL<INT> ivl = new IVL<INT>(null, 100) { Width = 90, HighClosed = true }; Assert.IsTrue(ivl.Validate()); var expectedXml = @"<test xmlns=""urn:hl7-org:v3"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" highClosed=""true""><high value=""100""/><width value=""90""/></test>"; var actualXml = R2SerializationHelper.SerializeAsString(ivl); R2SerializationHelper.XmlIsEquivalent(expectedXml, actualXml); }
public void IVLValidationNULLNullflavorLowIncludedHighIncludedPOPLowHighWidthValueTest() { IVL<INT> ivl = new IVL<INT>(); ivl.Low = 0; ivl.LowClosed = null; ivl.HighClosed = null; ivl.High = 5; ivl.Width = 5; ivl.Value = 1; ivl.NullFlavor = null; Assert.IsTrue(ivl.Validate()); }
public void IVLValidationNULLNullflavorHighLowIncludedHighIncludedWidthPOPLowTest() { IVL<INT> ivl = new IVL<INT>(); ivl.NullFlavor = null; ivl.High = null; ivl.LowClosed = null; ivl.HighClosed = null; ivl.Width = null; ivl.Low = 0; Assert.IsTrue(ivl.Validate()); }
public void IvlToSetTest01() { IVL<INT> interval = new IVL<INT>(1, 10) { HighClosed = true }; foreach (var i in interval.ToSet()) Console.WriteLine(i); interval.NullFlavor = null; Assert.IsTrue(interval.Validate()); }
public void SXCMNullValueTest() { SXCM<TEL> sxcm = new IVL<TEL>(); sxcm.Value = null; Assert.IsFalse(sxcm.Validate()); }
public void IVLValidationNULLLowLowIncludedHighIncludedHighWidthValuePOPNullflavorTest() { IVL<INT> ivl = new IVL<INT>(); ivl.Low = null; ivl.LowClosed = null; ivl.HighClosed = null; ivl.High = null; ivl.Width = null; ivl.Value = null; ivl.NullFlavor = NullFlavor.NotAsked; Assert.IsTrue(ivl.Validate()); }
public void IVLExampleTest04() { IVL<TS> currentlyOccuring = new IVL<TS>(); currentlyOccuring.NullFlavor = null; Console.WriteLine(currentlyOccuring.ToString()); Assert.IsFalse(currentlyOccuring.Validate()); }
public void ConstructingIVLTest02() { // Using low/width IVL<TS> janStartLow = new IVL<TS>() { Low = new TS(new DateTime(2012, 01, 01), DatePrecision.Day), Width = new PQ(15, "d") }; janStartLow.NullFlavor = null; Assert.IsTrue(janStartLow.Validate()); }
public void ConstructingIVLTest04() { // Using low IVL<TS> janStart = new IVL<TS>() { Low = new TS(new DateTime(2012, 01, 05), DatePrecision.Day), High = new TS(new DateTime(2012, 01, 05), DatePrecision.Day) }; janStart.NullFlavor = NullFlavor.Unknown; Assert.IsFalse(janStart.Validate()); }
public void IVLValidationNULLHighLowIncludedHighIncludedWidthPOPNullflavorLowTest() { IVL<INT> ivl = new IVL<INT>(); ivl.High = null; ivl.LowClosed = null; ivl.HighClosed = null; ivl.Width = null; ivl.Low = 0; ivl.NullFlavor = NullFlavor.NotAsked; Assert.IsFalse(ivl.Validate()); }
public void IVL_PQParseTest02() { IVL<PQ> ivl = new IVL<PQ>( new PQ(1, "s"), new PQ(10, "s") ); ivl.ValidTimeLow = new TS(new DateTime(2008, 01, 01), DatePrecision.Day); ivl.ValidTimeHigh = new TS(new DateTime(2008, 01, 31), DatePrecision.Day); ivl.UpdateMode = UpdateMode.Add; ivl.Width = null; ivl.NullFlavor = null; ivl.OriginalText = "Test"; // normalize the ivl expression Assert.IsTrue(ivl.Validate()); var actualXml = R2SerializationHelper.SerializeAsString(ivl); var ivl2 = R2SerializationHelper.ParseString<IVL<PQ>>(actualXml); Assert.AreEqual(ivl, ivl2); }
public void IVLExampleTest03() { IVL<TS> currentlyOccuring = new IVL<TS>(); currentlyOccuring.NullFlavor = NullFlavor.Other; Console.WriteLine(currentlyOccuring.ToString()); Assert.IsTrue(currentlyOccuring.Validate()); }
public void IVL_TSSerializationTest03() { IVL<TS> ivl = new IVL<TS>( null, // low new TS(new DateTime(2008, 01, 31), DatePrecision.Day) // high ); ivl.Width = new PQ(1, "w"); ivl.HighClosed = true; Assert.IsTrue(ivl.Validate()); var expectedXml = @"<test xmlns=""urn:hl7-org:v3"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" highClosed=""true""><high value=""20080131""/><width value=""1"" unit=""w""/></test>"; var actualXml = R2SerializationHelper.SerializeAsString(ivl); R2SerializationHelper.XmlIsEquivalent(expectedXml, actualXml); }
public void IVLValidationNULLNullflavorLowLowIncludedHighIncludedPOPHighWidthTest() { IVL<INT> ivl = new IVL<INT>(); ivl.NullFlavor = null; ivl.Low = null; ivl.LowClosed = null; ivl.HighClosed = null; ivl.High = 10; ivl.Width = 5; Assert.IsTrue(ivl.Validate()); }//Should validate
public void IVLNULLNullflavorHighLowIncludedHighIncludedWidthValidationTest() { IVL<INT> ivl = new IVL<INT>(); ivl.NullFlavor = null; ivl.High = null; ivl.LowClosed = null; ivl.HighClosed = null; ivl.Width = null; Assert.IsFalse(ivl.Validate()); }
public void IVLExampleTest01() { // create new timestamp interval IVL<TS> currentlyOccuring = new IVL<TS>(DateTime.Now); currentlyOccuring.NullFlavor = null; Console.WriteLine(currentlyOccuring.ToString()); Assert.IsTrue(currentlyOccuring.Validate()); }
public void ConstructingIVLTest07() { // Using low IVL<TS> janStart = new IVL<TS>(); janStart.Value = null; janStart.NullFlavor = null; janStart.High = null; janStart.Low = null; janStart.HighClosed = null; janStart.LowClosed = null; Assert.IsFalse(janStart.Validate()); }
public void ConstructingIVLTest05() { // Using low IVL<TS> janStart = new IVL<TS>() { LowClosed = true, //Low = new TS(new DateTime(2012, 01, 05), DatePrecision.Day), High = new TS(new DateTime(2012, 01, 05), DatePrecision.Day) }; Assert.IsFalse(janStart.Validate()); }
public void IVL_PQParseTest01() { IVL<PQ> ivl = new IVL<PQ>( new PQ(1, "s"), new PQ(10, "s") ); ivl.Width = new PQ(1, "w"); ivl.HighClosed = true; ivl.ValidTimeLow = null; ; ivl.ValidTimeHigh = null; ivl.UpdateMode = null; ivl.Width = null; ivl.NullFlavor = null; // normalize the ivl expression Assert.IsTrue(ivl.Validate()); var actualXml = R2SerializationHelper.SerializeAsString(ivl); var ivl2 = R2SerializationHelper.ParseString<IVL<PQ>>(actualXml); Assert.AreEqual(ivl, ivl2); }
public void ConstructingIVLTest03() { // Using high/width IVL<TS> janStartHigh = new IVL<TS>() { Width = new PQ(15, "d"), High = new TS(new DateTime(2012, 01, 05), DatePrecision.Day) }; janStartHigh.NullFlavor = null; Assert.IsTrue(janStartHigh.Validate()); }
public void IVL_PQSerializationTest03() { PQ low = new PQ(1, "s"); low.CodingRationale = new SET<CodingRationale>( CodingRationale.Required ); PQ high = new PQ(10, "s"); high.CodingRationale = new SET<CodingRationale>( CodingRationale.Required ); IVL<PQ> ivl = new IVL<PQ>( low, high ); ivl.ValidTimeLow = new TS(new DateTime(2008, 01, 01), DatePrecision.Day); ivl.ValidTimeHigh = new TS(new DateTime(2008, 01, 31), DatePrecision.Day); ivl.UpdateMode = UpdateMode.Add; ivl.Width = null; ivl.LowClosed = true; ivl.HighClosed = true; ivl.NullFlavor = null; ivl.OriginalText = "Test"; Assert.IsTrue(ivl.Validate()); var expectedXml = @"<test xmlns=""urn:hl7-org:v3"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" lowClosed=""true"" highClosed=""true"" validTimeLow=""20080101"" validTimeHigh=""20080131"" updateMode=""A"" ><originalText language=""en-US"" value=""Test"" /><low value=""1"" unit=""s"" codingRationale=""Required""/><high value=""10"" unit=""s"" codingRationale=""Required""/></test>"; var actualXml = R2SerializationHelper.SerializeAsString(ivl); R2SerializationHelper.XmlIsEquivalent(expectedXml, actualXml); }
public void ConstructingIVLTest01() { // Using low/high IVL<TS> janStart = new IVL<TS>( new TS(new DateTime(2012, 01, 01), DatePrecision.Day), new TS(new DateTime(2012, 01, 01), DatePrecision.Day) ); janStart.NullFlavor = null; Assert.IsTrue(janStart.Validate()); }
public void SXCMValueTest1() { SXCM<TEL> sxcm = new IVL<TEL>(); sxcm.Value = "HOLA"; Assert.IsTrue(sxcm.Validate()); }
public void ConstructingIVLTest06() { // Using low IVL<TS> janStart = new IVL<TS>() { HighClosed = true, Low = new TS(new DateTime(2012, 01, 05), DatePrecision.Day), // High = new TS(new DateTime(2012, 01, 05), DatePrecision.Day) }; janStart.NullFlavor = null; Assert.IsFalse(janStart.Validate()); }
public void IVLValidationNULLNullflavorLowHighWidthPOPHighIncludedLowIncludedTest() { IVL<INT> ivl = new IVL<INT>(); ivl.NullFlavor = null; ivl.Low = null; ivl.High = null; ivl.Width = null; ivl.HighClosed = true; ivl.LowClosed = true; Assert.IsFalse(ivl.Validate()); }
public void IVLExampleTest02() { IVL<TS> currentlyOccuring = new IVL<TS>(DateTime.Now); currentlyOccuring.NullFlavor = NullFlavor.Other; Console.WriteLine(currentlyOccuring.ToString()); Assert.IsFalse(currentlyOccuring.Validate()); }
public void IVL_PQSerializationTest01() { IVL<PQ> ivl = new IVL<PQ>( new PQ(1, "s"), new PQ(10, "s") ); ivl.LowClosed = true; ivl.HighClosed = true; ivl.ValidTimeLow = null; ; ivl.ValidTimeHigh = null; ivl.UpdateMode = null; ivl.Width = null; ivl.NullFlavor = null; Assert.IsTrue(ivl.Validate()); var expectedXml = @"<test xmlns=""urn:hl7-org:v3"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" lowClosed=""true"" highClosed=""true""><low value=""1"" unit=""s"" /><high value=""10"" unit=""s""/></test>"; var actualXml = R2SerializationHelper.SerializeAsString(ivl); R2SerializationHelper.XmlIsEquivalent(expectedXml, actualXml); }