/// <summary> /// Загрузить список акушерских анамнезов /// </summary> private void Load() { _obstetricHistoryList = new List <CObstetricHistory>(); string allDataStr = CDatabaseEngine.UnpackText(_obstetricHistoryPath); // Получаем набор объектов string[] objectsStr = allDataStr.Split(new[] { ObjSplitStr }, StringSplitOptions.RemoveEmptyEntries); // Проходим по всем объектам foreach (string objectStr in objectsStr) { // Для каждого объекта получаем список значений string[] datasStr = objectStr.Split(new[] { DataSplitStr }, StringSplitOptions.RemoveEmptyEntries); var obstetricHistoryInfo = new CObstetricHistory(); foreach (string dataStr in datasStr) { string[] keyValue = dataStr.Split(new[] { '=' }, 2); switch (keyValue[0]) { case "PatientId": obstetricHistoryInfo.PatientId = Convert.ToInt32(keyValue[1]); break; case "Chronology": obstetricHistoryInfo.Chronology = CConvertEngine.StringToBoolArray(keyValue[1]); break; case "ApgarScore": obstetricHistoryInfo.ApgarScore = keyValue[1]; break; case "BirthInjury": obstetricHistoryInfo.BirthInjury = keyValue[1]; break; case "ChildbirthWeeks": obstetricHistoryInfo.ChildbirthWeeks = keyValue[1]; break; case "ComplicationsDuringChildbirth": obstetricHistoryInfo.ComplicationsDuringChildbirth = keyValue[1]; break; case "ComplicationsInPregnancy": obstetricHistoryInfo.ComplicationsInPregnancy = keyValue[1]; break; case "DrugsInPregnancy": obstetricHistoryInfo.DrugsInPregnancy = keyValue[1]; break; case "DurationOfLabor": obstetricHistoryInfo.DurationOfLabor = keyValue[1]; break; case "Fetal": obstetricHistoryInfo.Fetal = keyValue[1]; break; case "HeightAtBirth": obstetricHistoryInfo.HeightAtBirth = keyValue[1]; break; case "HospitalTreatment": obstetricHistoryInfo.HospitalTreatment = keyValue[1]; break; case "IsTongsUsing": obstetricHistoryInfo.IsTongsUsing = Convert.ToBoolean(keyValue[1]); break; case "IsVacuumUsing": obstetricHistoryInfo.IsVacuumUsing = Convert.ToBoolean(keyValue[1]); break; case "ObstetricParalysis": obstetricHistoryInfo.ObstetricParalysis = keyValue[1]; break; case "OutpatientCare": obstetricHistoryInfo.OutpatientCare = keyValue[1]; break; case "WeightAtBirth": obstetricHistoryInfo.WeightAtBirth = keyValue[1]; break; } } _obstetricHistoryList.Add(obstetricHistoryInfo); } }
/// <summary> /// Загрузить список осмотров в отделении /// </summary> private void Load() { _medicalInspectionList = new List <CMedicalInspection>(); string allDataStr = CDatabaseEngine.UnpackText(_medicalInspectionPath); // Получаем набор объектов string[] objectsStr = allDataStr.Split(new[] { ObjSplitStr }, StringSplitOptions.RemoveEmptyEntries); // Проходим по всем объектам foreach (string objectStr in objectsStr) { // Для каждого объекта получаем список значений string[] datasStr = objectStr.Split(new[] { DataSplitStr }, StringSplitOptions.RemoveEmptyEntries); var medicalInspectionInfo = new CMedicalInspection(); foreach (string dataStr in datasStr) { string[] keyValue = dataStr.Split(new[] { '=' }, 2); switch (keyValue[0]) { case "HospitalizationId": medicalInspectionInfo.HospitalizationId = Convert.ToInt32(keyValue[1]); break; case "AnamneseAnMorbi": medicalInspectionInfo.AnamneseAnMorbi = keyValue[1]; break; case "AnamneseAnVitae": medicalInspectionInfo.AnamneseAnVitae = CConvertEngine.StringToBoolArray(keyValue[1]); break; case "AnamneseCheckboxes": medicalInspectionInfo.AnamneseCheckboxes = CConvertEngine.StringToBoolArray(keyValue[1]); break; case "AnamneseTextBoxes": medicalInspectionInfo.AnamneseTextBoxes = CConvertEngine.StringToStringArray(keyValue[1]); break; case "Complaints": medicalInspectionInfo.Complaints = keyValue[1]; break; case "ExpertAnamnese": medicalInspectionInfo.ExpertAnamnese = Convert.ToInt32(keyValue[1]); break; case "InspectionPlan": medicalInspectionInfo.InspectionPlan = keyValue[1]; break; case "StLocalisDescription": medicalInspectionInfo.StLocalisDescription = keyValue[1]; break; case "StLocalisRentgen": medicalInspectionInfo.StLocalisRentgen = keyValue[1]; break; case "IsAnamneseActive": medicalInspectionInfo.IsAnamneseActive = Convert.ToBoolean(keyValue[1]); break; case "IsPlanEnabled": medicalInspectionInfo.IsPlanEnabled = Convert.ToBoolean(keyValue[1]); break; case "IsStLocalisPart1Enabled": medicalInspectionInfo.IsStLocalisPart1Enabled = Convert.ToBoolean(keyValue[1]); break; case "IsStLocalisPart2Enabled": medicalInspectionInfo.IsStLocalisPart2Enabled = Convert.ToBoolean(keyValue[1]); break; case "LnFirstDateStart": medicalInspectionInfo.LnFirstDateStart = CConvertEngine.StringToDateTime(keyValue[1]); break; case "LnWithNumberDateEnd": medicalInspectionInfo.LnWithNumberDateEnd = CConvertEngine.StringToDateTime(keyValue[1]); break; case "LnWithNumberDateStart": medicalInspectionInfo.LnWithNumberDateStart = CConvertEngine.StringToDateTime(keyValue[1]); break; case "StLocalisPart1Fields": medicalInspectionInfo.StLocalisPart1Fields = CConvertEngine.StringToStringArray(keyValue[1]); break; case "StLocalisPart1OppositionFinger": medicalInspectionInfo.StLocalisPart1OppositionFinger = keyValue[1]; break; case "StLocalisPart2ComboBoxes": medicalInspectionInfo.StLocalisPart2ComboBoxes = CConvertEngine.StringToStringArray(keyValue[1]); break; case "StLocalisPart2LeftHand": medicalInspectionInfo.StLocalisPart2LeftHand = CConvertEngine.StringToStringArray(keyValue[1]); break; case "StLocalisPart2NumericUpDown": medicalInspectionInfo.StLocalisPart2NumericUpDown = Convert.ToInt32(keyValue[1]); break; case "StLocalisPart2RightHand": medicalInspectionInfo.StLocalisPart2RightHand = CConvertEngine.StringToStringArray(keyValue[1]); break; case "StLocalisPart2TextBoxes": medicalInspectionInfo.StLocalisPart2TextBoxes = CConvertEngine.StringToStringArray(keyValue[1]); break; case "StLocalisPart2WhichHand": medicalInspectionInfo.StLocalisPart2WhichHand = keyValue[1]; break; case "StPraesensComboBoxes": medicalInspectionInfo.StPraesensComboBoxes = CConvertEngine.StringToStringArray(keyValue[1]); break; case "StPraesensNumericUpDowns": medicalInspectionInfo.StPraesensNumericUpDowns = CConvertEngine.StringToIntArray(keyValue[1]); break; case "StPraesensTextBoxes": medicalInspectionInfo.StPraesensTextBoxes = CConvertEngine.StringToStringArray(keyValue[1]); break; case "TeoRisk": medicalInspectionInfo.TeoRisk = keyValue[1]; break; } } _medicalInspectionList.Add(medicalInspectionInfo); } }
/// <summary> /// Загрузить список карт обследования /// </summary> private void Load() { _obstetricParalysisCardList = new List <CObstetricParalysisCard>(); string allDataStr = CDatabaseEngine.UnpackText(_obstetricParalysisCardPath); // Получаем набор объектов string[] objectsStr = allDataStr.Split(new[] { ObjSplitStr }, StringSplitOptions.RemoveEmptyEntries); var errorStr = new StringBuilder(); try { // Проходим по всем объектам foreach (string objectStr in objectsStr) { // Для каждого объекта получаем список значений string[] datasStr = objectStr.Split(new[] { DataSplitStr }, StringSplitOptions.RemoveEmptyEntries); var obstetricParalysisCardInfo = new CObstetricParalysisCard(); foreach (string dataStr in datasStr) { string[] keyValue = dataStr.Split(new[] { '=' }, 2); switch (keyValue[0]) { case "HospitalizationId": obstetricParalysisCardInfo.HospitalizationId = Convert.ToInt32(keyValue[1]); break; case "VisitId": obstetricParalysisCardInfo.VisitId = Convert.ToInt32(keyValue[1]); break; case "CardSide": obstetricParalysisCardInfo.SideOfCard = CConvertEngine.StringToCardSide(keyValue[1]); break; case "GlobalAbductionPicturesSelection": obstetricParalysisCardInfo.GlobalAbductionPicturesSelection = CConvertEngine.StringToBoolArray(keyValue[1]); break; case "GlobalExternalRotationPicturesSelection": obstetricParalysisCardInfo.GlobalExternalRotationPicturesSelection = CConvertEngine.StringToBoolArray(keyValue[1]); break; case "HandToMouthPicturesSelection": obstetricParalysisCardInfo.HandToMouthPicturesSelection = CConvertEngine.StringToBoolArray(keyValue[1]); break; case "HandToNeckPicturesSelection": obstetricParalysisCardInfo.HandToNeckPicturesSelection = CConvertEngine.StringToBoolArray(keyValue[1]); break; case "HandToSpinePicturesSelection": obstetricParalysisCardInfo.HandToSpinePicturesSelection = CConvertEngine.StringToBoolArray(keyValue[1]); break; case "ComboBoxes": obstetricParalysisCardInfo.ComboBoxes = CConvertEngine.StringToStringArray(keyValue[1]); break; } } _obstetricParalysisCardList.Add(obstetricParalysisCardInfo); } } catch (Exception ex) { errorStr.Append(ex.Message + "\r\n"); } if (errorStr.Length != 0) { MessageBox.ShowDialog(errorStr.ToString()); } }