예제 #1
0
        public virtual void TestImpliedNullValue()
        {
            string result = new EivlTsR2PropertyFormatter().Format(CreateContext("EIVL<TS>"), new TELImpl());

            Assert.IsTrue(this.result.IsValid());
            AssertXml("xml output", "<eventRelatedPeriod nullFlavor=\"NI\"/>", result);
        }
예제 #2
0
        public virtual void TestNullValue()
        {
            string result = new EivlTsR2PropertyFormatter().Format(CreateContext("EIVL<TS>"), new TELImpl(Ca.Infoway.Messagebuilder.Domainvalue.Nullflavor.NullFlavor
                                                                                                          .NOT_APPLICABLE));

            Assert.IsTrue(this.result.IsValid());
            AssertXml("xml output", "<eventRelatedPeriod nullFlavor=\"NA\"/>", result);
        }
예제 #3
0
        public virtual void TestEivlTsFull()
        {
            PhysicalQuantity low = new PhysicalQuantity(new BigDecimal("120"), Ca.Infoway.Messagebuilder.Domainvalue.Basic.UnitsOfMeasureCaseSensitive
                                                        .CENTIMETRE);
            PhysicalQuantity high = new PhysicalQuantity(new BigDecimal("170"), Ca.Infoway.Messagebuilder.Domainvalue.Basic.UnitsOfMeasureCaseSensitive
                                                         .CENTIMETRE);
            Interval <PhysicalQuantity> ivl         = IntervalFactory.CreateLowHigh(low, high);
            TimingEvent timingEvent                 = Ca.Infoway.Messagebuilder.Domainvalue.Basic.TimingEvent.ACM;
            EventRelatedPeriodicIntervalTime @event = new EventRelatedPeriodicIntervalTime(ivl, timingEvent);
            string result = new EivlTsR2PropertyFormatter().Format(CreateContext("EIVL<TS>"), new EIVLImpl <EventRelatedPeriodicIntervalTime
                                                                                                            >(@event));

            Assert.IsTrue(this.result.IsValid());
            AssertXml("xml output", "<eventRelatedPeriod><event code=\"ACM\" codeSystem=\"2.16.840.1.113883.5.139\" codeSystemName=\"TimingEvent\" displayName=\"Acm\"/><offset><low unit=\"cm\" value=\"120\"/><high unit=\"cm\" value=\"170\"/></offset></eventRelatedPeriod>"
                      , result, true);
        }