예제 #1
0
        public static int CompareByReleaseDate(PatientClass patientInfo1, PatientClass patientInfo2)
        {
            if (patientInfo1.ReleaseDate.HasValue && patientInfo2.ReleaseDate.HasValue)
            {
                return(DateTime.Compare(patientInfo1.ReleaseDate.Value, patientInfo2.ReleaseDate.Value));
            }

            if (patientInfo1.ReleaseDate.HasValue)
            {
                return(1);
            }

            if (patientInfo2.ReleaseDate.HasValue)
            {
                return(-1);
            }

            return(CompareByName(patientInfo1, patientInfo2));
        }
예제 #2
0
        public static int CompareByOperationDate(PatientClass patientInfo1, PatientClass patientInfo2)
        {
            int operationLastIndex1 = patientInfo1.Operations.Count - 1;
            int operationLastIndex2 = patientInfo2.Operations.Count - 1;

            if (operationLastIndex1 > -1 && operationLastIndex2 > -1)
            {
                return(DateTime.Compare(
                           patientInfo1.Operations[operationLastIndex1].DataOfOperation,
                           patientInfo2.Operations[operationLastIndex2].DataOfOperation));
            }

            if (operationLastIndex1 > -1)
            {
                return(1);
            }

            if (operationLastIndex2 > -1)
            {
                return(-1);
            }

            return(CompareByName(patientInfo1, patientInfo2));
        }
예제 #3
0
        /// <summary>
        /// Скопировать данные о пациенте в переданного пациента (без использования new)
        /// </summary>
        /// <param name="patientInfo">Информация о пациенте</param>
        public void Copy(PatientClass patientInfo)
        {
            patientInfo.Id                      = Id;
            patientInfo.LastName                = LastName;
            patientInfo.Name                    = Name;
            patientInfo.Patronymic              = Patronymic;
            patientInfo.Birthday                = ConvertEngine.CopyDateTime(Birthday);
            patientInfo.BuildingNumber          = BuildingNumber;
            patientInfo.CityName                = CityName;
            patientInfo.Diagnose                = Diagnose;
            patientInfo.ConcomitantDiagnose     = ConcomitantDiagnose;
            patientInfo.Complications           = Complications;
            patientInfo.DoctorInChargeOfTheCase = DoctorInChargeOfTheCase;
            patientInfo.FlatNumber              = FlatNumber;
            patientInfo.WorkPlace               = WorkPlace;
            patientInfo.PassportNumber          = PassportNumber;
            patientInfo.PolisNumber             = PolisNumber;
            patientInfo.SnilsNumber             = SnilsNumber;
            patientInfo.Phone                   = Phone;
            patientInfo.TypeOfKSG               = TypeOfKSG;
            patientInfo.MKB                     = MKB;
            patientInfo.ServiceName             = ServiceName;
            patientInfo.ServiceCode             = ServiceCode;
            patientInfo.KsgCode                 = KsgCode;
            patientInfo.KsgDecoding             = KsgDecoding;
            patientInfo.HomeNumber              = HomeNumber;
            patientInfo.Nosology                = Nosology;
            patientInfo.NumberOfCaseHistory     = NumberOfCaseHistory;
            patientInfo.StreetName              = StreetName;
            patientInfo.PrivateFolder           = PrivateFolder;

            patientInfo.DeliveryDate = ConvertEngine.CopyDateTime(DeliveryDate);
            patientInfo.ReleaseDate  = ConvertEngine.CopyDateTime(ReleaseDate);

            patientInfo.Operations = new List <OperationClass>();
            foreach (OperationClass operation in Operations)
            {
                var newOperationClass = new OperationClass(operation);
                patientInfo.Operations.Add(newOperationClass);
            }

            patientInfo.TransferEpicrisAfterOperationPeriod = TransferEpicrisAfterOperationPeriod;
            patientInfo.TransferEpicrisPlan                    = TransferEpicrisPlan;
            patientInfo.TransferEpicrisWritingDate             = ConvertEngine.CopyDateTime(TransferEpicrisWritingDate);
            patientInfo.TransferEpicrisAdditionalInfo          = TransferEpicrisAdditionalInfo;
            patientInfo.TransferEpicrisDisabilityList          = TransferEpicrisDisabilityList;
            patientInfo.TransferEpicrisIsIncludeDisabilityList = TransferEpicrisIsIncludeDisabilityList;

            patientInfo.LineOfCommEpicrisAdditionalInfo = LineOfCommEpicrisAdditionalInfo;
            patientInfo.LineOfCommEpicrisPlan           = LineOfCommEpicrisPlan;
            patientInfo.LineOfCommEpicrisWritingDate    = ConvertEngine.CopyDateTime(LineOfCommEpicrisWritingDate);

            patientInfo.DischargeEpicrisAnalysisDate      = DischargeEpicrisAnalysisDate;
            patientInfo.DischargeEpicrisAfterOperation    = DischargeEpicrisAfterOperation;
            patientInfo.DischargeEpicrisEkg               = DischargeEpicrisEkg;
            patientInfo.DischargeEpicrisOakEritrocits     = DischargeEpicrisOakEritrocits;
            patientInfo.DischargeEpicrisOakHb             = DischargeEpicrisOakHb;
            patientInfo.DischargeEpicrisOakLekocits       = DischargeEpicrisOakLekocits;
            patientInfo.DischargeEpicrisOakSoe            = DischargeEpicrisOakSoe;
            patientInfo.DischargeEpicrisOamColor          = DischargeEpicrisOamColor;
            patientInfo.DischargeEpicrisOamDensity        = DischargeEpicrisOamDensity;
            patientInfo.DischargeEpicrisOamEritrocits     = DischargeEpicrisOamEritrocits;
            patientInfo.DischargeEpicrisOamLekocits       = DischargeEpicrisOamLekocits;
            patientInfo.DischargeEpicrisBakBillirubin     = DischargeEpicrisBakBillirubin;
            patientInfo.DischargeEpicrisBakGeneralProtein = DischargeEpicrisBakGeneralProtein;
            patientInfo.DischargeEpicrisBakPTI            = DischargeEpicrisBakPTI;
            patientInfo.DischargeEpicrisBakSugar          = DischargeEpicrisBakSugar;
            patientInfo.DischargeEpicrisBloodGroup        = DischargeEpicrisBloodGroup;
            patientInfo.DischargeEpicrisRhesusFactor      = DischargeEpicrisRhesusFactor;

            patientInfo.DischargeEpicrisAdditionalAnalises = DischargeEpicrisAdditionalAnalises;

            patientInfo.DischargeEpicrisRecomendations = new List <string>(DischargeEpicrisRecomendations);

            patientInfo.DischargeEpicrisAdditionalRecomendations = new List <string>(DischargeEpicrisAdditionalRecomendations);

            patientInfo.PrescriptionTherapy = new List <string>(PrescriptionTherapy);
            patientInfo.PrescriptionSurveys = new List <string>(PrescriptionSurveys);

            patientInfo.TreatmentPlanInspection = TreatmentPlanInspection;
            patientInfo.TreatmentPlanDate       = ConvertEngine.CopyDateTime(TreatmentPlanDate);
            patientInfo.IsTreatmentPlanActiveInOperationProtocol = IsTreatmentPlanActiveInOperationProtocol;

            patientInfo.MedicalInspectionAnamneseTraumaDate             = ConvertEngine.CopyDateTime(MedicalInspectionAnamneseTraumaDate);
            patientInfo.MedicalInspectionAnamneseAnMorbi                = MedicalInspectionAnamneseAnMorbi;
            patientInfo.MedicalInspectionAnamneseAnVitae                = CopyBoolArray(MedicalInspectionAnamneseAnVitae);
            patientInfo.MedicalInspectionAnamneseCheckboxes             = CopyBoolArray(MedicalInspectionAnamneseCheckboxes);
            patientInfo.MedicalInspectionAnamneseTextBoxes              = CopyStringArray(MedicalInspectionAnamneseTextBoxes);
            patientInfo.MedicalInspectionComplaints                     = MedicalInspectionComplaints;
            patientInfo.MedicalInspectionExpertAnamnese                 = MedicalInspectionExpertAnamnese;
            patientInfo.MedicalInspectionStLocalisDescription           = MedicalInspectionStLocalisDescription;
            patientInfo.MedicalInspectionStLocalisRentgen               = MedicalInspectionStLocalisRentgen;
            patientInfo.MedicalInspectionInspectionPlan                 = MedicalInspectionInspectionPlan;
            patientInfo.MedicalInspectionIsAnamneseActive               = MedicalInspectionIsAnamneseActive;
            patientInfo.MedicalInspectionIsPlanEnabled                  = MedicalInspectionIsPlanEnabled;
            patientInfo.MedicalInspectionIsStLocalisPart1Enabled        = MedicalInspectionIsStLocalisPart1Enabled;
            patientInfo.MedicalInspectionIsStLocalisPart2Enabled        = MedicalInspectionIsStLocalisPart2Enabled;
            patientInfo.MedicalInspectionLnFirstDateStart               = ConvertEngine.CopyDateTime(MedicalInspectionLnFirstDateStart);
            patientInfo.MedicalInspectionLnWithNumberDateEnd            = ConvertEngine.CopyDateTime(MedicalInspectionLnWithNumberDateEnd);
            patientInfo.MedicalInspectionLnWithNumberDateStart          = ConvertEngine.CopyDateTime(MedicalInspectionLnWithNumberDateStart);
            patientInfo.MedicalInspectionStLocalisPart1Fields           = CopyStringArray(MedicalInspectionStLocalisPart1Fields);
            patientInfo.MedicalInspectionStLocalisPart1OppositionFinger = MedicalInspectionStLocalisPart1OppositionFinger;
            patientInfo.MedicalInspectionStLocalisPart2ComboBoxes       = CopyStringArray(MedicalInspectionStLocalisPart2ComboBoxes);
            patientInfo.MedicalInspectionStLocalisPart2LeftHand         = CopyStringArray(MedicalInspectionStLocalisPart2LeftHand);
            patientInfo.MedicalInspectionStLocalisPart2NumericUpDown    = MedicalInspectionStLocalisPart2NumericUpDown;
            patientInfo.MedicalInspectionStLocalisPart2RightHand        = CopyStringArray(MedicalInspectionStLocalisPart2RightHand);
            patientInfo.MedicalInspectionStLocalisPart2TextBoxes        = CopyStringArray(MedicalInspectionStLocalisPart2TextBoxes);
            patientInfo.MedicalInspectionStLocalisPart2WhichHand        = MedicalInspectionStLocalisPart2WhichHand;
            patientInfo.MedicalInspectionStPraesensComboBoxes           = CopyStringArray(MedicalInspectionStPraesensComboBoxes);
            patientInfo.MedicalInspectionStPraesensNumericUpDowns       = CopyIntArray(MedicalInspectionStPraesensNumericUpDowns);
            patientInfo.MedicalInspectionStPraesensOthers               = MedicalInspectionStPraesensOthers;
            patientInfo.MedicalInspectionStPraesensTextBoxes            = CopyStringArray(MedicalInspectionStPraesensTextBoxes);
            patientInfo.MedicalInspectionTeoRisk = MedicalInspectionTeoRisk;
        }
예제 #4
0
        public PatientClass(PatientClass patientClass)
        {
            Id                      = patientClass.Id;
            LastName                = patientClass.LastName;
            Name                    = patientClass.Name;
            Patronymic              = patientClass.Patronymic;
            Birthday                = ConvertEngine.CopyDateTime(patientClass.Birthday);
            BuildingNumber          = patientClass.BuildingNumber;
            CityName                = patientClass.CityName;
            Diagnose                = patientClass.Diagnose;
            ConcomitantDiagnose     = patientClass.ConcomitantDiagnose;
            Complications           = patientClass.Complications;
            DoctorInChargeOfTheCase = patientClass.DoctorInChargeOfTheCase;
            FlatNumber              = patientClass.FlatNumber;
            WorkPlace               = patientClass.WorkPlace;
            PassportNumber          = patientClass.PassportNumber;
            PolisNumber             = patientClass.PolisNumber;
            SnilsNumber             = patientClass.SnilsNumber;
            Phone                   = patientClass.Phone;
            TypeOfKSG               = patientClass.TypeOfKSG;
            MKB                     = patientClass.MKB;
            ServiceName             = patientClass.ServiceName;
            ServiceCode             = patientClass.ServiceCode;
            KsgCode                 = patientClass.KsgCode;
            KsgDecoding             = patientClass.KsgDecoding;
            HomeNumber              = patientClass.HomeNumber;
            Nosology                = patientClass.Nosology;
            NumberOfCaseHistory     = patientClass.NumberOfCaseHistory;
            StreetName              = patientClass.StreetName;
            PrivateFolder           = patientClass.PrivateFolder;

            DeliveryDate = ConvertEngine.CopyDateTime(patientClass.DeliveryDate);
            ReleaseDate  = ConvertEngine.CopyDateTime(patientClass.ReleaseDate);

            Operations = new List <OperationClass>();
            foreach (OperationClass operation in patientClass.Operations)
            {
                var newOperationClass = new OperationClass(operation);
                Operations.Add(newOperationClass);
            }

            TransferEpicrisAfterOperationPeriod = patientClass.TransferEpicrisAfterOperationPeriod;
            TransferEpicrisPlan                    = patientClass.TransferEpicrisPlan;
            TransferEpicrisWritingDate             = ConvertEngine.CopyDateTime(patientClass.TransferEpicrisWritingDate);
            TransferEpicrisAdditionalInfo          = patientClass.TransferEpicrisAdditionalInfo;
            TransferEpicrisDisabilityList          = patientClass.TransferEpicrisDisabilityList;
            TransferEpicrisIsIncludeDisabilityList = patientClass.TransferEpicrisIsIncludeDisabilityList;

            LineOfCommEpicrisAdditionalInfo = patientClass.LineOfCommEpicrisAdditionalInfo;
            LineOfCommEpicrisPlan           = patientClass.LineOfCommEpicrisPlan;
            LineOfCommEpicrisWritingDate    = ConvertEngine.CopyDateTime(patientClass.LineOfCommEpicrisWritingDate);

            DischargeEpicrisAnalysisDate      = patientClass.DischargeEpicrisAnalysisDate;
            DischargeEpicrisAfterOperation    = patientClass.DischargeEpicrisAfterOperation;
            DischargeEpicrisEkg               = patientClass.DischargeEpicrisEkg;
            DischargeEpicrisOakEritrocits     = patientClass.DischargeEpicrisOakEritrocits;
            DischargeEpicrisOakHb             = patientClass.DischargeEpicrisOakHb;
            DischargeEpicrisOakLekocits       = patientClass.DischargeEpicrisOakLekocits;
            DischargeEpicrisOakSoe            = patientClass.DischargeEpicrisOakSoe;
            DischargeEpicrisOamColor          = patientClass.DischargeEpicrisOamColor;
            DischargeEpicrisOamDensity        = patientClass.DischargeEpicrisOamDensity;
            DischargeEpicrisOamEritrocits     = patientClass.DischargeEpicrisOamEritrocits;
            DischargeEpicrisOamLekocits       = patientClass.DischargeEpicrisOamLekocits;
            DischargeEpicrisBakBillirubin     = patientClass.DischargeEpicrisBakBillirubin;
            DischargeEpicrisBakGeneralProtein = patientClass.DischargeEpicrisBakGeneralProtein;
            DischargeEpicrisBakPTI            = patientClass.DischargeEpicrisBakPTI;
            DischargeEpicrisBakSugar          = patientClass.DischargeEpicrisBakSugar;
            DischargeEpicrisBloodGroup        = patientClass.DischargeEpicrisBloodGroup;
            DischargeEpicrisRhesusFactor      = patientClass.DischargeEpicrisRhesusFactor;

            DischargeEpicrisAdditionalAnalises = patientClass.DischargeEpicrisAdditionalAnalises;

            DischargeEpicrisRecomendations = new List <string>(patientClass.DischargeEpicrisRecomendations);

            DischargeEpicrisAdditionalRecomendations = new List <string>(patientClass.DischargeEpicrisAdditionalRecomendations);

            PrescriptionTherapy = new List <string>(patientClass.PrescriptionTherapy);
            PrescriptionSurveys = new List <string>(patientClass.PrescriptionSurveys);

            TreatmentPlanInspection = patientClass.TreatmentPlanInspection;
            TreatmentPlanDate       = ConvertEngine.CopyDateTime(patientClass.TreatmentPlanDate);
            IsTreatmentPlanActiveInOperationProtocol = patientClass.IsTreatmentPlanActiveInOperationProtocol;

            MedicalInspectionAnamneseTraumaDate             = ConvertEngine.CopyDateTime(patientClass.MedicalInspectionAnamneseTraumaDate);
            MedicalInspectionAnamneseAnMorbi                = patientClass.MedicalInspectionAnamneseAnMorbi;
            MedicalInspectionAnamneseAnVitae                = CopyBoolArray(patientClass.MedicalInspectionAnamneseAnVitae);
            MedicalInspectionAnamneseCheckboxes             = CopyBoolArray(patientClass.MedicalInspectionAnamneseCheckboxes);
            MedicalInspectionAnamneseTextBoxes              = CopyStringArray(patientClass.MedicalInspectionAnamneseTextBoxes);
            MedicalInspectionComplaints                     = patientClass.MedicalInspectionComplaints;
            MedicalInspectionExpertAnamnese                 = patientClass.MedicalInspectionExpertAnamnese;
            MedicalInspectionStLocalisDescription           = patientClass.MedicalInspectionStLocalisDescription;
            MedicalInspectionStLocalisRentgen               = patientClass.MedicalInspectionStLocalisRentgen;
            MedicalInspectionInspectionPlan                 = patientClass.MedicalInspectionInspectionPlan;
            MedicalInspectionIsAnamneseActive               = patientClass.MedicalInspectionIsAnamneseActive;
            MedicalInspectionIsPlanEnabled                  = patientClass.MedicalInspectionIsPlanEnabled;
            MedicalInspectionIsStLocalisPart1Enabled        = patientClass.MedicalInspectionIsStLocalisPart1Enabled;
            MedicalInspectionIsStLocalisPart2Enabled        = patientClass.MedicalInspectionIsStLocalisPart2Enabled;
            MedicalInspectionLnFirstDateStart               = ConvertEngine.CopyDateTime(patientClass.MedicalInspectionLnFirstDateStart);
            MedicalInspectionLnWithNumberDateEnd            = ConvertEngine.CopyDateTime(patientClass.MedicalInspectionLnWithNumberDateEnd);
            MedicalInspectionLnWithNumberDateStart          = ConvertEngine.CopyDateTime(patientClass.MedicalInspectionLnWithNumberDateStart);
            MedicalInspectionStLocalisPart1Fields           = CopyStringArray(patientClass.MedicalInspectionStLocalisPart1Fields);
            MedicalInspectionStLocalisPart1OppositionFinger = patientClass.MedicalInspectionStLocalisPart1OppositionFinger;
            MedicalInspectionStLocalisPart2ComboBoxes       = CopyStringArray(patientClass.MedicalInspectionStLocalisPart2ComboBoxes);
            MedicalInspectionStLocalisPart2LeftHand         = CopyStringArray(patientClass.MedicalInspectionStLocalisPart2LeftHand);
            MedicalInspectionStLocalisPart2NumericUpDown    = patientClass.MedicalInspectionStLocalisPart2NumericUpDown;
            MedicalInspectionStLocalisPart2RightHand        = CopyStringArray(patientClass.MedicalInspectionStLocalisPart2RightHand);
            MedicalInspectionStLocalisPart2TextBoxes        = CopyStringArray(patientClass.MedicalInspectionStLocalisPart2TextBoxes);
            MedicalInspectionStLocalisPart2WhichHand        = patientClass.MedicalInspectionStLocalisPart2WhichHand;
            MedicalInspectionStPraesensComboBoxes           = CopyStringArray(patientClass.MedicalInspectionStPraesensComboBoxes);
            MedicalInspectionStPraesensNumericUpDowns       = CopyIntArray(patientClass.MedicalInspectionStPraesensNumericUpDowns);
            MedicalInspectionStPraesensOthers               = patientClass.MedicalInspectionStPraesensOthers;
            MedicalInspectionStPraesensTextBoxes            = CopyStringArray(patientClass.MedicalInspectionStPraesensTextBoxes);
            MedicalInspectionTeoRisk = patientClass.MedicalInspectionTeoRisk;
        }
예제 #5
0
 public static int CompareByDeliveryDate(PatientClass patientInfo1, PatientClass patientInfo2)
 {
     return(DateTime.Compare(patientInfo1.DeliveryDate, patientInfo2.DeliveryDate));
 }
예제 #6
0
 public static int CompareByName(PatientClass patientInfo1, PatientClass patientInfo2)
 {
     return(string.Compare(patientInfo1.GetFullName(), patientInfo2.GetFullName()));
 }