public void TestCleanUp() { _mockObj = null; neighbourRef = null; patientVitalsStorage = null; patientVitals = null; }
public void Given_Valid_Arguments_When_Process_Invoked_Then_true_Asserted() { Thread thread = new Thread(new ThreadStart(m_processor.Process)); thread.Start(); int count = vitalsRepo.ReadAllVitals("Pat111").Count; PatientVitals vitals = new PatientVitals { PatientId = "Pat111", Vitals = new List <Vitals>() }; vitals.Vitals.Add(new Vitals { DeviceId = "Dev111", Value = 51 }); SharedQueue queue = SharedQueue.Instance; queue.Enqueue(vitals); Thread.Sleep(10000); Assert.AreEqual(count + 1, vitalsRepo.ReadAllVitals("Pat111").Count); thread.Abort(); File.Delete("C:\\VitalsDB\\TestDatabase\\Pat111.txt"); }
public void TestInit() { dataAccess = new DataAccess(); patientVitalsData = new PatientVitals() { PatientId = "TRIW10", Spo2 = 88, Temperature = 97, PulseRate = 70 }; enabledVitalsList = new List <VitalSign> { new VitalSign { IsEnabled = true, Type = VitalsType.Spo2 }, }; diffVitalsList = new List <VitalSign> { new VitalSign { IsEnabled = true, Type = VitalsType.Spo2 }, new VitalSign { IsEnabled = true, Type = VitalsType.PulseRate } }; patientVitalsData2 = new PatientVitals() { PatientId = "102", Spo2 = 88, Temperature = 97, PulseRate = 70 }; }
public void Given_Valid_Arguments_When_Multiple_Subscribe_Invoked_Then_Valid_Result_Asserted() { Callbacks callbacks = new Callbacks(); VitalsMonitoringFunction func = new VitalsMonitoringFunction(callbacks.VitalsCallback); vitalsMonitorList.Subscribe("patientId", "id", func); func = new VitalsMonitoringFunction(callbacks.VitalsCallback1); vitalsMonitorList.Subscribe("patientId1", "id1", func); SharedResources.VitalsMonitorList.VitalsMonitorList list = SharedResources.VitalsMonitorList.VitalsMonitorList.Instance; var output = list.TryGetValue("patientId"); PatientVitals alert = new PatientVitals(); foreach (var function in output) { function.Invoke(alert); } Assert.AreEqual("TestPassed", alert.PatientId); output = list.TryGetValue("patientId1"); foreach (var function in output) { function.Invoke(alert); } Assert.AreEqual("TestPassed1", alert.PatientId); vitalsMonitorList.Unsubscribe("patientId", "id"); vitalsMonitorList.Unsubscribe("patientId1", "id1"); }
public override async Task <IActionResult> PatchAsync(int id, [FromBody] PatientVitals patientVital) { //var attrToUpdate = _jsonApiContext.AttributesToUpdate; //var patientVitalOld = _dbContextResolver.GetDbSet<PatientVitals>().Where(m => m.Id == id).FirstOrDefault(); //CommonMethods commonMethods = new CommonMethods(); //List<AuditLogs> auditLogs = commonMethods.GetAuditLogValues(patientVitalOld, patientVital, "PatientVitals", attrToUpdate) // //.Where(i => attrToUpdate.Keys.Any(a1 => a1.InternalAttributeName == i.PropertyName)) // .Select(q => new AuditLogs() { NewValue = q.NewValue, OldValue = q.OldValue, PrimaryKeyID = q.PrimaryKeyID, TableName = q.TableName, PropertyName = q.PropertyName }).ToList(); //await _dbContextResolver.GetDbSet<AuditLogs>().AddRangeAsync(auditLogs); AttrAttribute BMI = new AttrAttribute(AttrToUpdate.BMI.ToString(), AttrToUpdate.BMI.ToString()); _jsonApiContext.AttributesToUpdate.Remove(BMI); patientVital = calculateBmi(patientVital); _jsonApiContext.AttributesToUpdate.Add(BMI, patientVital.BMI); //return await base.PatchAsync(id, patientVital); //var patientVitalInfo = await base.PatchAsync(id, patientVital); //int eventID = _dbContextResolver.GetDbSet<Event>().LastOrDefault().Id + 1; //List<AuditLogs> auditLogs = commonMethods.GetAuditLogValues(patientVitalOld, patientVital, "PatientVitals", attrToUpdate) // //.Where(i => attrToUpdate.Keys.Any(a1 => a1.InternalAttributeName == i.PropertyName)) // .Select(q => new AuditLogs() { NewValue = q.NewValue, OldValue = q.OldValue, PrimaryKeyID = q.PrimaryKeyID, TableName = q.TableName, PropertyName = q.PropertyName, EventID = eventID }).ToList(); //await _dbContextResolver.GetDbSet<AuditLogs>().AddRangeAsync(auditLogs); return(await base.PatchAsync(id, patientVital)); }
public void Given_Valid_Arguments_When_WriteVitals_Invoked_Then_File_Created_Valid_Result_Asserted() { PatientVitals vitals = new PatientVitals { PatientId = "333", Vitals = new List <Vitals> { new Vitals { DeviceId = "100", Value = 100.0 }, new Vitals { DeviceId = "101", Value = 10.0 } } }; IVitalsRepository repo = new DataAccessLayer.VitalsRepositoryLib.VitalsRepository(true); repo.WriteVitals(vitals); var result = repo.ReadAllVitals(vitals.PatientId); Assert.IsNotNull(result); vitals = result[0]; Assert.AreEqual("333", vitals.PatientId); Assert.AreEqual("100", vitals.Vitals[0].DeviceId); Assert.AreEqual("101", vitals.Vitals[1].DeviceId); Assert.AreEqual(100.0, vitals.Vitals[0].Value); Assert.AreEqual(10.0, vitals.Vitals[1].Value); File.Delete("C:\\VitalsDB\\TestDatabase\\333.txt"); }
public void Given_Valid_Arguments_When_WriteVitals_Invoked_Then_File_Appended_Valid_Result_Asserted() { PatientVitals vitals = new PatientVitals { PatientId = "111", Vitals = new List <Vitals> { new Vitals { DeviceId = "100", Value = 100.0 }, new Vitals { DeviceId = "101", Value = 10.0 } } }; IVitalsRepository repo = new DataAccessLayer.VitalsRepositoryLib.VitalsRepository(true); repo.WriteVitals(vitals); repo.WriteVitals(vitals); repo.WriteVitals(vitals); int count = repo.ReadAllVitals("111").Count; repo.WriteVitals(vitals); Assert.AreEqual(count + 1, repo.ReadAllVitals(vitals.PatientId).Count); File.Delete("C:\\VitalsDB\\TestDatabase\\111.txt"); }
/// <summary> /// This function stores the values of the patient-vitals generated for a particular patient /// </summary> /// <param name="patientVitals"></param> public void StorePatientVitalsData(PatientVitals patientVitals) { if (patientVitals.PatientId == "") { throw new ArgumentException("PtaientTid"); } _dataAccessComponent.WritePatientVitalsData(patientVitals); }
public void ReceiveVitals(PatientVitals vitals) { Console.WriteLine(vitals.PatientId); foreach (var vital in vitals.Vitals) { Console.WriteLine(vital.DeviceId + " : " + vital.Value); } }
public void WriteVitals(PatientVitals vitals) { var path = Path.Combine(vitalsRepositoryPath, vitals.PatientId + ".txt"); var file = File.AppendText(path); file.WriteLine(vitals.ToString()); file.Close(); }
public void AlertUsers(PatientVitals vitals) { VitalsMonitorList subscribers = VitalsMonitorList.Instance; var subscriberList = subscribers.TryGetValue(vitals.PatientId); foreach (var func in subscriberList) { func.Invoke(vitals); } }
public void GivenPatientVitals_WhenStorePatientVitalsDataCalled_ExpectedMokerFunctionCalledOnce() { PatientVitals patientVitalsData = new PatientVitals() { PatientId = "101", Spo2 = 88, Temperature = 97, PulseRate = 70 }; patientVitalsStorage.StorePatientVitalsData(patientVitalsData); _mockObj.Verify(neighbour => neighbour.WritePatientVitalsData(patientVitalsData), Moq.Times.Exactly(1)); }
/// <summary> /// This function reads the values of the vitals(SPO2,Temp,PulseRate) that was generated & stored of a particular patient if it exists /// </summary> /// <param name="patientId"></param> /// <returns>obj of PatientVitals else null</returns> public PatientVitals ReadPatientVitalsData(string patientId) { Queue <PatientVitals> patientVitalsData = null; if (GlobalShare.PatientVitalsignDataDict.TryGetValue(patientId, out patientVitalsData)) { PatientVitals patientVitals = patientVitalsData.Dequeue(); return(patientVitals); } return(null); }
public void Init() { patientVitals = new PatientVitals() { PatientId = "", Spo2 = 98, PulseRate = 67, Temperature = 98 }; _mockObj = new Moq.Mock <IDataAccessComponent>(); neighbourRef = _mockObj.Object; patientVitalsStorage = new QueuePatientVitalsStorage(neighbourRef); _mockObj.Setup(f => f.WritePatientVitalsData(null)).Throws <ArgumentNullException>(); _mockObj.Setup(f => f.WritePatientVitalsData(patientVitals)).Throws <ArgumentNullException>(); }
public PatientVitals Dequeue() { PatientVitals vitals = new PatientVitals(); mutex.WaitOne(); if (vitalsQueue.Any()) { vitals = vitalsQueue.Dequeue(); } mutex.ReleaseMutex(); return(vitals); }
static void Main(string[] args) { VitalsDataServiceClient client = new VitalsDataServiceClient(); PatientVitals vitals = new PatientVitals(); vitals.PatientId = "111"; vitals.Vitals = new List <Vitals> { new Vitals { DeviceId = "233", Value = 222.2 } }; client.WriteVitals(vitals); Console.WriteLine("Completed"); }
public void PostVitalsToCheckWhenInRange() { VitalsCheckerRepository vitalsCheckerRepository = new VitalsCheckerRepository(); PatientVitals patientVitals = new PatientVitals(); patientVitals.Id = 1; patientVitals.Vitals = new List <int> { 100, 91, 90 }; List <PatientVitals> li = new List <PatientVitals>(); var response = vitalsCheckerRepository.CheckVitals(li); Assert.AreEqual(true, response); }
/// <summary> /// This function returns alert message after validation of vital signs /// </summary> /// <param name="item"></param> /// <param name="patientVitals"></param> /// <returns>alert message</returns> public string SendAlert(VitalSign item, PatientVitals patientVitals) { StringBuilder stringBuilder = new StringBuilder(40); if (item.IsEnabled) { PropertyInfo property = typeof(PatientVitals).GetProperty(item.Type.ToString()); var vitalsValidator = InstanceCreator.Create_Instance(property.Name, "Validator") as IPatientVitalsValidate; if (!vitalsValidator.Validate((double)property.GetValue(patientVitals))) { stringBuilder.Append(property.Name + "Alert "); } } return(stringBuilder.ToString()); }
/// <summary> /// This function writes the generated values of the enabled vitals for a paticular patient /// </summary> /// <param name="patientVitals"></param> public void WritePatientVitalsData(PatientVitals patientVitals) { Queue <PatientVitals> patientVitalsQueue; if (GlobalShare.PatientVitalsignDataDict.TryGetValue(patientVitals.PatientId, out patientVitalsQueue)) { patientVitalsQueue.Enqueue(patientVitals); GlobalShare.PatientVitalsignDataDict[patientVitals.PatientId] = patientVitalsQueue; } else { patientVitalsQueue = new Queue <PatientVitals>(); patientVitalsQueue.Enqueue(patientVitals); GlobalShare.PatientVitalsignDataDict.Add(patientVitals.PatientId, patientVitalsQueue); } }
/// <summary> /// This function returns alert messsage depending upon the validation of the vitals values of a particular patient /// </summary> /// <param name="patientId"></param> /// <returns>AlertMessage</returns> public string PatientVitalsAlertUponValidation(string patientId) { PatientVitalsAlerter patientVitalsAlerter = new PatientVitalsAlerter(); string alertMessage = ""; PatientVitals patientVitals = _dataAccessComponent.ReadPatientVitalsData(patientId); List <VitalSign> enabledVitalsList = _dataAccessComponent.GetEnabledVitalsList(patientId); foreach (var item in enabledVitalsList) { alertMessage += patientVitalsAlerter.SendAlert(item, patientVitals); } if (alertMessage == "") { alertMessage = "Healthy"; } return(alertMessage); }
public void Given_Valid_Warning_Arguments_When_Validate_Vitals_Range_Invoked_Then_Valid_Result_Asserted() { PatientVitals vitals = new PatientVitals { PatientId = "Pat111", Vitals = new List <Vitals>() }; vitals.Vitals.Add(new Vitals { DeviceId = "Dev111", Value = 76 }); PatientAlert alert = m_validator.ValidateVitalsRange(vitals); Assert.AreEqual(1, alert.WarningAlerts.Count); }
public void Given_Invalid_Arguments_When_Validate_Vitals_Range_Invoked_Then_Invalid_Result_Asserted() { PatientVitals vitals = new PatientVitals { PatientId = "Pat111", Vitals = new List <Vitals>() }; vitals.Vitals.Add(new Vitals { DeviceId = "Dev112", Value = 51 }); PatientAlert alert = m_validator.ValidateVitalsRange(vitals); Assert.IsFalse(alert.CriticalAlerts.Any()); }
public string ProcessJsonInput(string _jsonString) { string patientAlert = ""; try { PatientVitals parseddata = JsonConvert.DeserializeObject <PatientVitals>(_jsonString); if (parseddata.pulserate < 150) { patientAlert += "pulse,low,"; } else if (parseddata.pulserate > 200) { patientAlert += "pulse,high,"; } if (parseddata.spo2 < 70) { patientAlert += "spo2,low,"; } else if (parseddata.spo2 > 90) { patientAlert += "spo2,high,"; } if (parseddata.temperature < 97) { patientAlert += "temperature,low"; } else if (parseddata.temperature > 101) { patientAlert += "temperature,high"; } char lastCharacter = patientAlert[patientAlert.Length - 1]; if (lastCharacter == ',') { patientAlert = patientAlert.Substring(0, patientAlert[patientAlert.Length - 1]); } } catch (Exception ex) { Console.WriteLine(ex); } return(patientAlert); }
public PatientAlert ValidateVitalsRange(PatientVitals patientVitals) { PatientAlert patientAlert = new PatientAlert(); patientAlert.PatientId = patientVitals.PatientId; patientAlert.CriticalAlerts = new List <DeviceAlert>(); patientAlert.WarningAlerts = new List <DeviceAlert>(); var patient = repository.Read(patientVitals.PatientId); if (!patient.MuteAlert) { foreach (Vitals vital in patientVitals.Vitals) { TryValidate(patient, vital, ref patientAlert); } } return(patientAlert); }
public void Given_Invalid_Arguments_When_ReadAllVitals_Invoked_Then_Invalid_Result_Asserted() { PatientVitals vitals = new PatientVitals { PatientId = "555", Vitals = new List <Vitals> { new Vitals { DeviceId = "100", Value = 100.0 }, new Vitals { DeviceId = "101", Value = 10.0 } } }; IVitalsRepository repo = new DataAccessLayer.VitalsRepositoryLib.VitalsRepository(true); var result = repo.ReadAllVitals(vitals.PatientId); Assert.IsFalse(result.Any()); }
private PatientVitals StringToVitals(string input) { string[] inputArray = input.Split('/'); PatientVitals vitals = new PatientVitals { PatientId = inputArray[0], Vitals = new List <Vitals>() }; for (var i = 2; i < inputArray.Length - 1; i++) { Vitals info = new Vitals { DeviceId = inputArray[i] }; i++; info.Value = Convert.ToDouble(inputArray[i]); vitals.Vitals.Add(info); } return(vitals); }
public void Given_Valid_Arguments_Floor_Subscription_When_AlertUsers_Invoked_Then_Valid_Result_Asserted() { Callbacks callbacks = new Callbacks(); VitalsMonitorList subList = VitalsMonitorList.Instance; subList.Subscribe("Pat111", "PIC-2", callbacks.VitalsCallback); PatientVitals vitals = new PatientVitals { PatientId = "Pat111", Vitals = new List <Vitals>() }; vitals.Vitals.Add(new Vitals { DeviceId = "Dev111", Value = 50 }); vitalsAlertManager.AlertUsers(vitals); Assert.AreEqual("TestPassed", vitals.PatientId); subList.Unsubscribe("Pat111", "PIC-2"); }
public string PatientVitalsAlert(string patientId) { IDataAccessComponent dataAccess = InstanceCreator.Create_Instance("DataAccess", "") as IDataAccessComponent; PatientVitals patientVitals = dataAccess.ReadPatientVitalsData(patientId); List <VitalSign> enabledVitalsList = dataAccess.GetEnabledVitalsList(patientId); foreach (var item in enabledVitalsList) { if (item.IsEnabled) { PropertyInfo property = typeof(PatientVitals).GetProperty(item.Type.ToString()); var vitalsValidator = InstanceCreator.Create_Instance(property.Name, "Validator") as IPatientVitalsValidate; if (!vitalsValidator.Validate((double)property.GetValue(patientVitals))) { alertMessage += property.Name + "Alert "; } } } return(alertMessage); }
static void Main(string[] args) { DeviceRegistration(); PatientRegistration(); DoctorRegistration(); HospitalBedRegistration(); NewPatientAdmission(); DoctorMonitoringServiceClient docClient = new DoctorMonitoringServiceClient(new InstanceContext(new DoctorMonitoringCallback())); docClient.SubscribeToVitals("111", "100"); docClient.SubscribeToPatientAlerts("100"); VitalsDataServiceClient client = new VitalsDataServiceClient(); PatientVitals vitals = new PatientVitals(); for (int i = 0; i < 20; i++) { vitals.PatientId = "111"; vitals.Vitals = new List <Vitals>() { new Vitals { DeviceId = "Temperature", Value = 85 } }; client.WriteVitals(vitals); Thread.Sleep(2000); vitals.PatientId = "222"; vitals.Vitals = new List <Vitals>() { new Vitals { DeviceId = "Temperature", Value = 20 }, new Vitals { DeviceId = "SPO2", Value = 78 } }; Thread.Sleep(2000); client.WriteVitals(vitals); } }
public void Load() { if (baseFrameworkElement == null) { return; } patientVitals = new PatientVitals("WaveformData.xml"); // get series data for (int i = 0; i < series.Length; i++) { seriesItems[i] = (SeriesDataItems)series[i].Data; } seriesItems[0].AddValue(patientVitals.GetWaveformData("ECGSinusRhythm")); seriesItems[1].AddValue(patientVitals.GetWaveformData("ECGJunctionalTachy")); seriesItems[2].AddValue(patientVitals.GetWaveformData("ECGAcceleratedIVR")); seriesItems[3].AddValue(patientVitals.GetWaveformData("Pulse")); seriesItems[4].AddValue(patientVitals.GetWaveformData("O2Saturation")); }
public void SetCurrent(PatientVitals current) { currentVitals = current; }
public void LoadInfoXML(string filename) { Serializer<PatientInfo> serializer = new Serializer<PatientInfo>(); Info = serializer.Load(filename); Info.Debug(); // setup the info.startingDateTime Info.startingDateTime = DateTime.Now; if (Info.startingTime != ""){ // look for TraumaBrain and set the starting time there Brain tb = FindObjectOfType(typeof(Brain)) as Brain; if (tb != null){ tb.SetStartTime(Info.startingTime); } // make one for us, maybe we don't really need our own... string[] ss = Info.startingTime.Split (':') ; if (ss.Length == 2){ int hours = 0; int mins = 0; int.TryParse(ss[0],out hours); int.TryParse(ss[1],out mins); TimeSpan ts = new TimeSpan(hours, mins, 0); Info.startingDateTime = Info.startingDateTime.Date + ts; } } // initialize initial patient vitals Vitals = new PatientVitals(); Vitals.Set(Info.initialVitalState, 0.0f); VitalsMgr.GetInstance().SetCurrent(Vitals); // start behavior, null is nothing VitalsBehaviorManager.GetInstance().AddBehavior(Info.initialVitalsBehavior); VitalsBehaviorManager.GetInstance().StateChange += VitalsBehaviorChange; // lets create and load up the PatientRecords structure with this data if (PatientRecords == null){ PatientRecords = new List<PatientRecord>(); } Record = new PatientRecord(); Record.Name = "filename"; //we currently only ever have one Record.Info = Info; Record.XRayRecords = new List<ScanRecord>(); Record.FastRecords = new List<ScanRecord>(); Record.CTRecords = new List<ScanRecord>(); // load up the list of records Serializer<ScanRecord> scanSerializer = new Serializer<ScanRecord>(); foreach (string recordPath in Info.scanRecords){ // string pathname = "XML/Patient/Records"+recordPath.Replace (".xml",""); ScanRecord record = scanSerializer.Load(recordPath); LoadScanRecord( record ); } // set XRAY images // deprecate these !!! use the Record.XrayRecords, get by name. ChestXRAY = Info.chestXRAY; PelvicXRAY = Info.pelvicXRAY; gcs_eyes = Info.gcsEyes; gcs_verbal = Info.gcsVerbal; gcs_motor = Info.gcsMotor; gcs_total = Info.gcsTotal; /* ScanRecord chestXrayRecord = new ScanRecord(); chestXrayRecord.Name = "chest"; chestXrayRecord.Region = "Chest"; chestXrayRecord.Filename = Info.chestXRAY; Record.XRayRecords.Add (chestXrayRecord); // CreateStringXML( Info.fast); ScanRecord pelvicXrayRecord = new ScanRecord(); pelvicXrayRecord.Name = "pelvis"; pelvicXrayRecord.Region = "Pelvis"; pelvicXrayRecord.Filename = Info.pelvicXRAY; Record.XRayRecords.Add (pelvicXrayRecord); // make assumption about the order of fast filenames // perihepatic, perisplenic, pelvis, pericardium, chest ScanRecord perihepaticFastRecord = new ScanRecord(); perihepaticFastRecord.Name = "perihepatic"; perihepaticFastRecord.Region = "Perihepatic"; perihepaticFastRecord.Filename = Info.fast[0]; perihepaticFastRecord.Thumbnail = Info.fastThumbnail[0]; Record.FastRecords.Add(perihepaticFastRecord); ScanRecord perisplenicFastRecord = new ScanRecord(); perisplenicFastRecord.Name = "perisplenic"; perisplenicFastRecord.Region = "Perisplenic"; perisplenicFastRecord.Filename = Info.fast[1]; perisplenicFastRecord.Thumbnail = Info.fastThumbnail[1]; Record.FastRecords.Add(perisplenicFastRecord); ScanRecord pelvisFastRecord = new ScanRecord(); pelvisFastRecord.Name = "pelvis"; pelvisFastRecord.Region = "Pelvis"; pelvisFastRecord.Filename = Info.fast[2]; pelvisFastRecord.Thumbnail = Info.fastThumbnail[2]; Record.FastRecords.Add(pelvisFastRecord); ScanRecord pericardiumFastRecord = new ScanRecord(); pericardiumFastRecord.Name = "pericardium"; pericardiumFastRecord.Region = "Pericardium"; pericardiumFastRecord.Filename = Info.fast[3]; pericardiumFastRecord.Thumbnail = Info.fastThumbnail[3]; Record.FastRecords.Add(pericardiumFastRecord); if (Info.fast.Count > 4){ ScanRecord chestFastRecord = new ScanRecord(); chestFastRecord.Name = "chest"; chestFastRecord.Region = "Chest"; chestFastRecord.Filename = Info.fast[4]; chestFastRecord.Thumbnail = Info.fastThumbnail[4]; Record.FastRecords.Add(chestFastRecord); } // load CT results // make assumption about the order of fast filenames // brain, cspine, chest, abdomen, tlspine ScanRecord brainCTRecord = new ScanRecord(); brainCTRecord.Name = "brain"; brainCTRecord.Region = "Brain"; brainCTRecord.Filename = Info.CT[0]; brainCTRecord.Thumbnail = Info.CTThumbnail[0]; Record.CTRecords.Add(brainCTRecord); ScanRecord cspineCTRecord = new ScanRecord(); cspineCTRecord.Name = "cspine"; cspineCTRecord.Region = "C-Spine"; cspineCTRecord.Filename = Info.CT[1]; cspineCTRecord.Thumbnail = Info.CTThumbnail[1]; Record.CTRecords.Add(cspineCTRecord); ScanRecord chestCTRecord = new ScanRecord(); chestCTRecord.Name = "chest"; chestCTRecord.Region = "Chest"; chestCTRecord.Filename = Info.CT[2]; chestCTRecord.Thumbnail = Info.CTThumbnail[2]; Record.CTRecords.Add(chestCTRecord); ScanRecord abdomenCTRecord = new ScanRecord(); abdomenCTRecord.Name = "abdomen"; abdomenCTRecord.Region = "Abdomen"; abdomenCTRecord.Filename = Info.CT[3]; abdomenCTRecord.Thumbnail = Info.CTThumbnail[3]; Record.CTRecords.Add(abdomenCTRecord); ScanRecord tlspineCTRecord = new ScanRecord(); tlspineCTRecord.Name = "tlspine"; tlspineCTRecord.Region = "TL-Spine"; tlspineCTRecord.Filename = Info.CT[4]; tlspineCTRecord.Thumbnail = Info.CTThumbnail[4]; Record.CTRecords.Add(tlspineCTRecord); */ PatientRecords.Add(Record); // now these can be accessed with Patient.GetPatientRecord().GetXRay("name") etc // set initial state and seektimes // load decisions foreach( string decision in Info.decisions ) DecisionMgr.GetInstance().LoadXML(decision); }