Beispiel #1
0
    IEnumerator getAllPatients()
    {
        yield return(HoloStorageClient.GetMultiplePatients(patientList, patientIds));

        if (patientList.Count == 0)
        {
            Message.text = "There is no patients for you";
        }
        else
        {
            GenerateListView(patientList);
        }
    }
    IEnumerator getAllPatients()
    {
        List <Patient> patientList = new List <Patient>();

        yield return(HoloStorageClient.GetMultiplePatients(patientList, "p-101,p-102,p-103"));

        All.SetActive(true);
        foreach (Patient patient in patientList)
        {
            GameObject button = Instantiate(buttonTemplates) as GameObject;
            button.SetActive(true);
            button.GetComponent <DemoScript>().SetText(patient.name.full);
            button.transform.SetParent(buttonTemplates.transform.parent, false);
        }
    }
Beispiel #3
0
        public IEnumerator getMultiplePatientTest()
        {
            List <Patient> patientList = new List <Patient>();

            yield return(HoloStorageClient.GetMultiplePatients(patientList, "p100,p101,nullPatient"));

            Assert.AreEqual(patientList[0].pid, "p100");
            Assert.AreEqual(patientList[0].gender, "female");
            Assert.AreEqual(patientList[0].birthDate, "1947-05-25");
            Assert.AreEqual(patientList[0].name.full, "Rosario Aufderhar");

            Assert.AreEqual(patientList[1].pid, "p101");
            Assert.AreEqual(patientList[1].gender, "male");
            Assert.AreEqual(patientList[1].birthDate, "1947-06-04");
            Assert.AreEqual(patientList[1].name.full, "Buster Greenholt");

            //The response with "pid = nullPatient" from server should be empty
            Assert.AreEqual(patientList.Count, 2);
        }
    IEnumerator getPatients()
    {
        yield return(HoloStorageClient.GetMultiplePatients(patientList, PatientsId));

        foreach (Patient patient in patientList)
        {
            GameObject button = Instantiate(buttonTemplates) as GameObject;
            button.SetActive(true);

            string information =
                $"{(patientName ? $"<b>{patient.name.full}</b>\n" : "")}" +
                $"{(patientID ? $"ID: {patient.pid}\n" : "")}" +
                $"{(birthDate ? $"Date of birth: {patient.birthDate.Substring(0, 10)}\n" : "")}" +
                $"{(gender ? $"Gender: {patient.gender}" : "")}";

            button.GetComponent <ListItem>().SetText(information);

            button.transform.SetParent(buttonTemplates.transform.parent, false);
        }
    }