コード例 #1
0
ファイル: IVLExamplesTest.cs プロジェクト: zzllkk2003/everest
        public void IVLExampleTest02()
        {
            IVL <TS> currentlyOccuring = new IVL <TS>(DateTime.Now);

            currentlyOccuring.NullFlavor = NullFlavor.Other;
            Console.WriteLine(currentlyOccuring.ToString());
            Assert.IsFalse(currentlyOccuring.Validate());
        }
コード例 #2
0
ファイル: IVLExamplesTest.cs プロジェクト: zzllkk2003/everest
        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());
        }
コード例 #3
0
ファイル: IVLTest.cs プロジェクト: avjabalpur/ccd-generator
        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());
        }
コード例 #4
0
ファイル: IVLExamplesTest.cs プロジェクト: zzllkk2003/everest
        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());
        }
コード例 #5
0
ファイル: IVLTest.cs プロジェクト: avjabalpur/ccd-generator
        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());
        }
コード例 #6
0
ファイル: IVLTest.cs プロジェクト: avjabalpur/ccd-generator
        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());
        }
コード例 #7
0
ファイル: IVLTest.cs プロジェクト: avjabalpur/ccd-generator
        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
コード例 #8
0
ファイル: IVLExamplesTest.cs プロジェクト: zzllkk2003/everest
        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());
        }
コード例 #9
0
ファイル: IVLExamplesTest.cs プロジェクト: zzllkk2003/everest
        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());
        }
コード例 #10
0
ファイル: IVLExamplesTest.cs プロジェクト: zzllkk2003/everest
        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());
        }
コード例 #11
0
ファイル: IVLExamplesTest.cs プロジェクト: zzllkk2003/everest
        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());
        }
コード例 #12
0
ファイル: IVLTest.cs プロジェクト: avjabalpur/ccd-generator
        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());
        }
コード例 #13
0
ファイル: IVLTest.cs プロジェクト: avjabalpur/ccd-generator
        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());
        }
コード例 #14
0
ファイル: IVLTest.cs プロジェクト: avjabalpur/ccd-generator
        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());
        }
コード例 #15
0
ファイル: IVLExamplesTest.cs プロジェクト: zzllkk2003/everest
        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());
        }
コード例 #16
0
ファイル: IVLExamplesTest.cs プロジェクト: zzllkk2003/everest
        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());
        }
コード例 #17
0
        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());
        }
コード例 #18
0
        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);
        }
コード例 #19
0
        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);
        }
コード例 #20
0
        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);
        }
コード例 #21
0
        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);
        }
コード例 #22
0
        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);
        }
コード例 #23
0
        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);
        }
コード例 #24
0
ファイル: IVLTest.cs プロジェクト: oneminot/everest
        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);
        }
コード例 #25
0
ファイル: IVLTest.cs プロジェクト: oneminot/everest
 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());
 }
コード例 #26
0
ファイル: IVLTest.cs プロジェクト: oneminot/everest
 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());
 }
コード例 #27
0
ファイル: IVLToSETTest.cs プロジェクト: oneminot/everest
 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());
 }
コード例 #28
0
ファイル: SXCMTest.cs プロジェクト: oneminot/everest
 public void SXCMNullValueTest()
 {
     SXCM<TEL> sxcm = new IVL<TEL>();
     sxcm.Value = null;
     Assert.IsFalse(sxcm.Validate());
 }
コード例 #29
0
ファイル: IVLTest.cs プロジェクト: oneminot/everest
 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());
 }
コード例 #30
0
ファイル: IVLExamplesTest.cs プロジェクト: oneminot/everest
 public void IVLExampleTest04()
 {
     IVL<TS> currentlyOccuring = new IVL<TS>();
     currentlyOccuring.NullFlavor = null;
     Console.WriteLine(currentlyOccuring.ToString());
     Assert.IsFalse(currentlyOccuring.Validate());
 }
コード例 #31
0
ファイル: IVLExamplesTest.cs プロジェクト: oneminot/everest
 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());
 }
コード例 #32
0
ファイル: IVLExamplesTest.cs プロジェクト: oneminot/everest
 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());
 }
コード例 #33
0
ファイル: IVLTest.cs プロジェクト: oneminot/everest
 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());
 }
コード例 #34
0
ファイル: IVLTest.cs プロジェクト: oneminot/everest
        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);
        }
コード例 #35
0
ファイル: IVLExamplesTest.cs プロジェクト: oneminot/everest
 public void IVLExampleTest03()
 {
     IVL<TS> currentlyOccuring = new IVL<TS>();
     currentlyOccuring.NullFlavor = NullFlavor.Other;
     Console.WriteLine(currentlyOccuring.ToString());
     Assert.IsTrue(currentlyOccuring.Validate());
 }
コード例 #36
0
ファイル: IVLTest.cs プロジェクト: oneminot/everest
        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);
        }
コード例 #37
0
ファイル: IVLTest.cs プロジェクト: oneminot/everest
 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
コード例 #38
0
ファイル: IVLTest.cs プロジェクト: oneminot/everest
 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());
 }
コード例 #39
0
ファイル: IVLExamplesTest.cs プロジェクト: oneminot/everest
 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());
 }
コード例 #40
0
ファイル: IVLExamplesTest.cs プロジェクト: oneminot/everest
 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());
 }
コード例 #41
0
ファイル: IVLExamplesTest.cs プロジェクト: oneminot/everest
 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());
 }
コード例 #42
0
ファイル: IVLTest.cs プロジェクト: oneminot/everest
        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);
        }
コード例 #43
0
ファイル: IVLExamplesTest.cs プロジェクト: oneminot/everest
 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());
 }
コード例 #44
0
ファイル: IVLTest.cs プロジェクト: oneminot/everest
        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);
        } 
コード例 #45
0
ファイル: IVLExamplesTest.cs プロジェクト: oneminot/everest
 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());
 }
コード例 #46
0
ファイル: SXCMTest.cs プロジェクト: oneminot/everest
 public void SXCMValueTest1()
 {
     SXCM<TEL> sxcm = new IVL<TEL>();
     sxcm.Value = "HOLA";
     Assert.IsTrue(sxcm.Validate());
 }
コード例 #47
0
ファイル: IVLExamplesTest.cs プロジェクト: oneminot/everest
 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());
 }
コード例 #48
0
ファイル: IVLTest.cs プロジェクト: oneminot/everest
 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());
 }
コード例 #49
0
ファイル: IVLExamplesTest.cs プロジェクト: oneminot/everest
 public void IVLExampleTest02()
 {
     IVL<TS> currentlyOccuring = new IVL<TS>(DateTime.Now);
     currentlyOccuring.NullFlavor = NullFlavor.Other;
     Console.WriteLine(currentlyOccuring.ToString());
     Assert.IsFalse(currentlyOccuring.Validate());
 }
コード例 #50
0
ファイル: IVLTest.cs プロジェクト: oneminot/everest
        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);
        }