Beispiel #1
0
        public virtual void TestNullCase()
        {
            string result = new RtoPqPqPropertyFormatter().Format(GetContext("name", "RTO<PQ.DRUG,PQ.TIME>"), new RTOImpl <PhysicalQuantity
                                                                                                                           , PhysicalQuantity>());

            AssertXml("result", "<name nullFlavor=\"NI\"/>", result);
        }
Beispiel #2
0
        public virtual void TestInvalidNullCase()
        {
            string result = new RtoPqPqPropertyFormatter().Format(GetContext("name", "RTO<PQ.DRUG,PQ.TIME>"), new RTOImpl <PhysicalQuantity
                                                                                                                           , PhysicalQuantity>(new Ratio <PhysicalQuantity, PhysicalQuantity>()));

            Assert.IsNotNull(result);
            Assert.IsFalse(this.result.IsValid());
            Assert.AreEqual(3, this.result.GetHl7Errors().Count);
        }
Beispiel #3
0
        public virtual void TestBasic()
        {
            Ratio <PhysicalQuantity, PhysicalQuantity> ratio = new Ratio <PhysicalQuantity, PhysicalQuantity>();

            ratio.Numerator = new PhysicalQuantity(new BigDecimal("1.00"), Ca.Infoway.Messagebuilder.Domainvalue.Basic.UnitsOfMeasureCaseSensitive
                                                   .MILLIGRAM);
            ratio.Denominator = new PhysicalQuantity(new BigDecimal("10.00"), Ca.Infoway.Messagebuilder.Domainvalue.Basic.UnitsOfMeasureCaseSensitive
                                                     .MILLILITRE);
            string result = new RtoPqPqPropertyFormatter().Format(GetContext("name", "RTO<PQ.DRUG,PQ.DRUG>"), new RTOImpl <PhysicalQuantity
                                                                                                                           , PhysicalQuantity>(ratio));

            AssertXml("result", "<name><numerator unit=\"mg\" value=\"1.00\"/><denominator unit=\"mL\" value=\"10.00\"/></name>", result
                      );
        }