IEnumerator getHolograms()
    {
        yield return(HoloStorageClient.GetMultipleHolograms(hologramList, HologramsId));

        foreach (Hologram hologram in hologramList)
        {
            GameObject button = Instantiate(buttonTemplates) as GameObject;
            button.SetActive(true);

            string information =
                $"{(title ? $"<b>{hologram.title}</b>\n" : "")}" +
                $"{(hologramID ? $"ID: {hologram.hid}\n":"")}" +
                $"{(description ? $"Description: {hologram.description}\n" : "")}" +
                $"{(contentType ? $"Content Type: {hologram.contentType}\n" : "")}" +
                $"{(fileSizeInkb ? $"File Size: {hologram.fileSizeInKb}\n" : "")}" +
                $"{(bodySite ? $"Body Site: {hologram.bodySite}\n" : "")}" +
                $"{(dateOfImaging ? $"Date Of Imaging: {hologram.dateOfImaging.Substring(0, 10)}\n" : "")}" +
                $"{(creationDate ? $"Creation Date: {hologram.creationDate.Substring(0, 10)}\n" : "")}" +
                $"{(creationMode ? $"Creation Mode: {hologram.creationMode}\n" : "")}" +
                $"{(creationDescription ? $"Creation Description: {hologram.creationDescription}" : "")}";

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

            button.transform.SetParent(buttonTemplates.transform.parent, false);
        }
    }
Example #2
0
    IEnumerator getAllHolograms(string patientID)
    {
        yield return(HoloStorageClient.GetMultipleHolograms(hologramList, patientID, QueryType.pids));

        if (hologramList.Count == 0)
        {
            Title.text   = patient.name.full;
            Message.text = "There is no Holograms for this patient";
        }
        else
        {
            GenerateListView(hologramList);
            Title.text = patient.name.full;
        }
    }
Example #3
0
        public IEnumerator getMultipleHologramsTest()
        {
            List <Hologram> hologramList = new List <Hologram>();

            yield return(HoloStorageClient.GetMultipleHolograms(hologramList, "p100,p101,nullPatient", QueryType.pids));

            Assert.AreEqual(hologramList[0].hid, "h101");
            Assert.AreEqual(hologramList[0].title, "Lungs Hologram");
            Assert.AreEqual(hologramList[0].description, "Lungs of patient");
            Assert.AreEqual(hologramList[0].contentType, "model/gltf-binary");
            Assert.AreEqual(hologramList[0].fileSizeInKb, 1471);
            Assert.AreEqual(hologramList[0].bodySite, "chest");
            Assert.AreEqual(hologramList[0].dateOfImaging, "2017-07-15T15:20:25Z");
            Assert.AreEqual(hologramList[0].creationDate, "2019-01-02T12:30:45Z");
            Assert.AreEqual(hologramList[0].creationMode, "GENERATE_FROM_IMAGING_STUDY");
            Assert.AreEqual(hologramList[0].creationDescription, "Demo of output generated by the lung segmentation pipeline");
            Assert.AreEqual(hologramList[0].aid, "a101");
            Assert.AreEqual(hologramList[0].pid, "p100");

            Assert.AreEqual(hologramList[1].hid, "h100");

            //Totally 3 holograms data from server, (no response with "pid = nullPatient")
            Assert.AreEqual(hologramList.Count, 3);
        }