buildLabObject() public method

public buildLabObject ( string id, string accessionNumber, string testType, string specimen, string status, string collectedDate, string completedDate, string result, string units, string codingValue, string codingSystem, string normalLow, string normalHigh ) : TestType
id string
accessionNumber string
testType string
specimen string
status string
collectedDate string
completedDate string
result string
units string
codingValue string
codingSystem string
normalLow string
normalHigh string
return TestType
Ejemplo n.º 1
0
        public void testBuildLabObject()
        {
            CCRHelper helper = new CCRHelper();
            TestType lab = helper.buildLabObject("CH;6899693.88;47", "CH 0323 1433",
                "TRIGLYCERIDE", "SERUM", "completed", "3100305.12",
                "3100323.11314", "162", "mg/dL", "2345-7", "LOINC", "60", "110");

            Assert.IsNotNull(lab);
            Assert.AreEqual(lab.IDs.Count, 2);
            Assert.IsTrue(String.Equals(lab.IDs[0].ID, "CH;6899693.88;47"));
            Assert.IsTrue(String.Equals(lab.IDs[0].Type.Text, "ID"));
            Assert.IsTrue(String.Equals(lab.IDs[1].ID, "CH 0323 1433"));
            Assert.IsTrue(String.Equals(lab.IDs[1].Type.Text, "Accession number"));
            Assert.IsNotNull(lab.TestResult);
            Assert.IsTrue(String.Equals(lab.TestResult.Value, "162"));
            Assert.IsTrue(String.Equals(lab.TestResult.Units.Unit, "mg/dL"));
            Assert.AreEqual(lab.DateTime.Count, 2);
            Assert.IsTrue(String.Equals(lab.DateTime[0].ExactDateTime, "3100305.12"));
            Assert.IsTrue(String.Equals(lab.DateTime[0].Type.Text, "Collection date"));
            Assert.IsTrue(String.Equals(lab.DateTime[1].ExactDateTime, "3100323.11314"));
            Assert.IsTrue(String.Equals(lab.DateTime[1].Type.Text, "Completed date"));
            Assert.IsNotNull(lab.NormalResult);
            Assert.IsTrue(String.Equals(lab.NormalResult.First().Value, "60 - 110"));
            Assert.IsTrue(String.Equals(lab.Description.Text, "TRIGLYCERIDE - SERUM"));
            Assert.IsTrue(String.Equals(lab.Description.Code[0].Value, "2345-7"));
            Assert.IsTrue(String.Equals(lab.Description.Code[0].CodingSystem, "LOINC"));
            Assert.IsTrue(String.Equals(lab.Status.Text, "completed"));
        }
Ejemplo n.º 2
0
        public void testBuildLabObject()
        {
            CCRHelper helper = new CCRHelper();
            TestType  lab    = helper.buildLabObject("CH;6899693.88;47", "CH 0323 1433",
                                                     "TRIGLYCERIDE", "SERUM", "completed", "3100305.12",
                                                     "3100323.11314", "162", "mg/dL", "2345-7", "LOINC", "60", "110");

            Assert.IsNotNull(lab);
            Assert.AreEqual(lab.IDs.Count, 2);
            Assert.IsTrue(String.Equals(lab.IDs[0].ID, "CH;6899693.88;47"));
            Assert.IsTrue(String.Equals(lab.IDs[0].Type.Text, "ID"));
            Assert.IsTrue(String.Equals(lab.IDs[1].ID, "CH 0323 1433"));
            Assert.IsTrue(String.Equals(lab.IDs[1].Type.Text, "Accession number"));
            Assert.IsNotNull(lab.TestResult);
            Assert.IsTrue(String.Equals(lab.TestResult.Value, "162"));
            Assert.IsTrue(String.Equals(lab.TestResult.Units.Unit, "mg/dL"));
            Assert.AreEqual(lab.DateTime.Count, 2);
            Assert.IsTrue(String.Equals(lab.DateTime[0].ExactDateTime, "3100305.12"));
            Assert.IsTrue(String.Equals(lab.DateTime[0].Type.Text, "Collection date"));
            Assert.IsTrue(String.Equals(lab.DateTime[1].ExactDateTime, "3100323.11314"));
            Assert.IsTrue(String.Equals(lab.DateTime[1].Type.Text, "Completed date"));
            Assert.IsNotNull(lab.NormalResult);
            Assert.IsTrue(String.Equals(lab.NormalResult.First().Value, "60 - 110"));
            Assert.IsTrue(String.Equals(lab.Description.Text, "TRIGLYCERIDE - SERUM"));
            Assert.IsTrue(String.Equals(lab.Description.Code[0].Value, "2345-7"));
            Assert.IsTrue(String.Equals(lab.Description.Code[0].CodingSystem, "LOINC"));
            Assert.IsTrue(String.Equals(lab.Status.Text, "completed"));
        }