public buildProblemObject ( string problemName, string problemId, string startDate, string stopDate, string entered, string lastUpdated, string providerName, string codingSystem, string codingValue, string codingVersion, string statusCode, string statusText ) : |
||
problemName | string | |
problemId | string | |
startDate | string | |
stopDate | string | |
entered | string | |
lastUpdated | string | |
providerName | string | |
codingSystem | string | |
codingValue | string | |
codingVersion | string | |
statusCode | string | |
statusText | string | |
return |
public void testToCCRProblem() { CCRHelper helper = new CCRHelper(); ProblemType problem = helper.buildProblemObject("Congestive Heart Failure", "939", "3110103", "", "3110719", "3110719", "VEHU,TEN", "ICD9", "428.0", "", "A", "ACTIVE"); Assert.IsNotNull(problem); Assert.IsTrue(String.Equals(problem.Description.Text, "Congestive Heart Failure")); Assert.AreEqual(problem.IDs.Count, 1); Assert.IsTrue(String.Equals(problem.IDs.First().ID, "939")); Assert.AreEqual(problem.DateTime.Count, 4); Assert.IsTrue(String.Equals(problem.DateTime[0].ExactDateTime, "3110103")); Assert.IsTrue(String.Equals(problem.DateTime[0].Type.Text, "Start date")); Assert.IsTrue(String.Equals(problem.DateTime[1].ExactDateTime, "")); Assert.IsTrue(String.Equals(problem.DateTime[1].Type.Text, "Stop date")); Assert.IsTrue(String.Equals(problem.DateTime[2].ExactDateTime, "3110719")); Assert.IsTrue(String.Equals(problem.DateTime[2].Type.Text, "Entered date")); Assert.IsTrue(String.Equals(problem.DateTime[3].ExactDateTime, "3110719")); Assert.IsTrue(String.Equals(problem.DateTime[3].Type.Text, "Updated date")); Assert.AreEqual(problem.Source.Count, 1); Assert.AreEqual(problem.Source.First().Actor.Count, 1); Assert.IsTrue(String.Equals(problem.Source.First().Actor.First().ActorID, "VEHU,TEN")); Assert.IsTrue(String.Equals(problem.Source.First().Actor.First().ActorRole.First().Text, "Treating clinician")); Assert.AreEqual(problem.Description.Code.Count, 1); Assert.IsTrue(String.Equals(problem.Description.Code.First().Value, "428.0")); Assert.IsTrue(String.Equals(problem.Description.Code.First().CodingSystem, "ICD9")); Assert.IsTrue(String.Equals(problem.Description.Code.First().Version, "")); Assert.IsTrue(String.Equals(problem.Status.Text, "ACTIVE")); Assert.IsTrue(String.Equals(problem.Status.Code.First().Value, "A")); }