Beispiel #1
0
        public bool ViewImage(string patientId, string accNo, string studyId)
        {
            PacsConfig pacs = JsonConvert.DeserializeObject <PacsConfig>(File.ReadAllText(pacsConfig));

            if (!pacs.desktopClient.disabled)
            {
                return(viewImageByDesktop(pacs.desktopClient, patientId, accNo));
            }
            if (!pacs.webClient.disabled)
            {
                return(viewImageByWeb(pacs.webClient, patientId, studyId));
            }
            return(false);
        }
Beispiel #2
0
        public bool EditPacsConfig(PacsConfig jsonPacs)
        {
            if (jsonPacs == null)
            {
                return(false);
            }

            //File.WriteAllText(@"pacs.json", JsonConvert.SerializeObject(jsonPacs));
            // serialize JSON directly to a file
            using (StreamWriter file = File.CreateText(pacsConfig))
            {
                JsonSerializer serializer = new JsonSerializer();
                serializer.Serialize(file, jsonPacs);
            }

            return(true);
        }