Exemplo n.º 1
0
        public virtual void TestBasicPeriodPhaseAsCeRx()
        {
            GeneralTimingSpecification gts = new GeneralTimingSpecification(IntervalFactory.CreateLowHigh <PlatformDate>(DateUtil.GetDate
                                                                                                                             (1969, 11, 31), DateUtil.GetDate(1969, 11, 31)), PeriodicIntervalTime.CreatePeriodPhase(new DateDiff(new PlatformDate(0)
                                                                                                                                                                                                                                  ), IntervalFactory.CreateLowHigh <PlatformDate>(DateUtil.GetDate(1969, 11, 31), DateUtil.GetDate(1969, 11, 31))));
            string result = new GtsBoundedPivlFormatter().Format(new Ca.Infoway.Messagebuilder.Marshalling.HL7.Formatter.FormatContextImpl
                                                                     (this.result, null, "name", "GTS.BOUNDEDPIVL", null, null, false, SpecificationVersion.V01R04_3, null, null, null, false
                                                                     ), new GTSImpl(gts));

            AssertXml("result", "<name xsi:type=\"SXPR_TS\">" + "<comp operator=\"I\" xsi:type=\"IVL_TS\">" + "<low value=\"19691231\"/>"
                      + "<high value=\"19691231\"/></comp>" + "<comp xsi:type=\"PIVL_TS\">" + "<period/><phase><low value=\"19691231\"/><high value=\"19691231\"/></phase></comp></name>"
                      , result);
            Assert.IsTrue(this.result.IsValid());
        }
Exemplo n.º 2
0
        public virtual void TestBasicPeriodPhase()
        {
            GeneralTimingSpecification gts = new GeneralTimingSpecification(IntervalFactory.CreateLowHigh <PlatformDate>(DateUtil.GetDate
                                                                                                                             (1969, 11, 31), DateUtil.GetDate(1969, 11, 31)), PeriodicIntervalTime.CreatePeriodPhase(new DateDiff(new PlatformDate(0)
                                                                                                                                                                                                                                  ), IntervalFactory.CreateLowHigh <PlatformDate>(DateUtil.GetDate(1969, 11, 31), DateUtil.GetDate(1969, 11, 31))));
            string result = new GtsBoundedPivlFormatter().Format(GetContext("name"), new GTSImpl(gts));

            AssertXml("result", "<name specializationType=\"GTS.BOUNDEDPIVL\" xsi:type=\"SXPR_TS\">" + "<comp specializationType=\"IVL_TS.FULLDATE\" xsi:type=\"IVL_TS\">"
                      + "<low value=\"19691231\"/>" + "<high value=\"19691231\"/></comp>" + "<comp operator=\"I\" specializationType=\"PIVL_TS.DATETIME\" xsi:type=\"PIVL_TS\">"
                      + "<period/><phase><low value=\"19691231\"/><high value=\"19691231\"/></phase></comp></name>", result);
            Assert.IsTrue(this.result.IsValid());
        }