public buildAllergyObject ( string id, string localId, string name, string allergyType, string allergyTypeCode, string enteredDate, string verifiedDate, string status, IList |
||
id | string | |
localId | string | |
name | string | |
allergyType | string | |
allergyTypeCode | string | |
enteredDate | string | |
verifiedDate | string | |
status | string | |
reactions | IList |
|
return |
public void testBuildAllergyObject() { CCRHelper helper = new CCRHelper(); AlertType allergy = helper.buildAllergyObject("774", "125;GMRD(120.82,", "PENICILLIN", "DRUG", "D", "3050317.191", "3050317.191042", "ACTIVE", new List<string>() { "ITCHING,WATERING EYES" }); Assert.IsNotNull(allergy); Assert.AreEqual(allergy.DateTime.Count, 2); Assert.IsTrue(String.Equals(allergy.DateTime[0].ExactDateTime, "3050317.191")); Assert.IsTrue(String.Equals(allergy.DateTime[0].Type.Text, "Entered date")); Assert.IsTrue(String.Equals(allergy.DateTime[1].ExactDateTime, "3050317.191042")); Assert.IsTrue(String.Equals(allergy.DateTime[1].Type.Text, "Verified date")); Assert.IsTrue(String.Equals(allergy.Status.Text, "ACTIVE")); Assert.AreEqual(allergy.IDs.Count, 2); Assert.IsTrue(String.Equals(allergy.IDs[0].ID, "774")); Assert.IsTrue(String.Equals(allergy.IDs[0].Type.Text, "ID")); Assert.IsTrue(String.Equals(allergy.IDs[1].ID, "125;GMRD(120.82,")); Assert.IsTrue(String.Equals(allergy.IDs[1].Type.Text, "Local ID")); Assert.IsTrue(String.Equals(allergy.Description.Text, "PENICILLIN")); Assert.IsTrue(String.Equals(allergy.Type.Text, "DRUG")); Assert.IsTrue(String.Equals(allergy.Type.Code[0].Value, "D")); Assert.AreEqual(allergy.Reaction.Count, 1); Assert.IsTrue(String.Equals(allergy.Reaction[0].Description.Text, "ITCHING,WATERING EYES")); }
public void testBuildAllergyObject() { CCRHelper helper = new CCRHelper(); AlertType allergy = helper.buildAllergyObject("774", "125;GMRD(120.82,", "PENICILLIN", "DRUG", "D", "3050317.191", "3050317.191042", "ACTIVE", new List <string>() { "ITCHING,WATERING EYES" }); Assert.IsNotNull(allergy); Assert.AreEqual(allergy.DateTime.Count, 2); Assert.IsTrue(String.Equals(allergy.DateTime[0].ExactDateTime, "3050317.191")); Assert.IsTrue(String.Equals(allergy.DateTime[0].Type.Text, "Entered date")); Assert.IsTrue(String.Equals(allergy.DateTime[1].ExactDateTime, "3050317.191042")); Assert.IsTrue(String.Equals(allergy.DateTime[1].Type.Text, "Verified date")); Assert.IsTrue(String.Equals(allergy.Status.Text, "ACTIVE")); Assert.AreEqual(allergy.IDs.Count, 2); Assert.IsTrue(String.Equals(allergy.IDs[0].ID, "774")); Assert.IsTrue(String.Equals(allergy.IDs[0].Type.Text, "ID")); Assert.IsTrue(String.Equals(allergy.IDs[1].ID, "125;GMRD(120.82,")); Assert.IsTrue(String.Equals(allergy.IDs[1].Type.Text, "Local ID")); Assert.IsTrue(String.Equals(allergy.Description.Text, "PENICILLIN")); Assert.IsTrue(String.Equals(allergy.Type.Text, "DRUG")); Assert.IsTrue(String.Equals(allergy.Type.Code[0].Value, "D")); Assert.AreEqual(allergy.Reaction.Count, 1); Assert.IsTrue(String.Equals(allergy.Reaction[0].Description.Text, "ITCHING,WATERING EYES")); }