示例#1
0
        private void FindContactPatients(List <PatientWardModel> PatientWardList, ContactParameter parameter)
        {
            foreach (PatientWardModel patientWard in PatientWardList)
            {
                ContactPatientsParameter   secondQueryParameter = SecondParameterConstructor(patientWard, parameter);
                List <ContactPatientModel> contactPatientList   = null;
                if (patientWard.StationID == null)
                {
                    _logger.LogInformation("ContactNetworkFactory.FindContactPatients(): No WardID From ContactNetworkFactory.FindWardsQuery(). Set DepartementID to WardID.");
                    secondQueryParameter.WardID = patientWard.Fachabteilung;
                    contactPatientList          = _restData.AQLQuery <ContactPatientModel>(AQLCatalog.ContactPatients_WithoutWardInformation(secondQueryParameter));
                }
                else
                {
                    contactPatientList = _restData.AQLQuery <ContactPatientModel>(AQLCatalog.ContactPatients(secondQueryParameter));
                }
                if (contactPatientList == null)
                {
                    _logger.LogDebug("ContactNetworkFactory.FindContactPatients(): Found No Contact Patients For Ward {wardID} - ResultSet: NULL", secondQueryParameter.WardID);
                    continue;
                }

                ContactModelConstructor(contactPatientList);
            }
        }
 public ContactPatientsParameter(ContactParameter contactParameter, PatientWardModel patientWard)
 {
     PatientID      = contactParameter.PatientID;
     Starttime      = patientWard.Beginn;
     Endtime        = patientWard.Ende;
     SuperStarttime = contactParameter.Starttime;
     SuperEndtime   = contactParameter.Endtime;
     Departement    = patientWard.Fachabteilung;
     WardID         = patientWard.StationID;
 }
示例#3
0
        private void FindWardsQuery()
        {
            ContactParameter        parameter       = patientStack.Pop();
            List <PatientWardModel> patientWardList = _restData.AQLQuery <PatientWardModel>(AQLCatalog.ContactPatientWards(parameter));

            if (patientWardList is null)
            {
                _logger.LogDebug("ContactNetworkFactory.FindWardsQuery(): Found No Wards - ResultSet: NULL");
                return;
            }

            FindContactPatients(patientWardList, parameter);
        }
示例#4
0
        private void updatePatientStack(ContactPatientModel contactPatient, ContactParameter parameter)
        {
            if (currentDegree < parameter.Degree)
            {
                ContactParameter newContractParameter = new ContactParameter();
                newContractParameter.Starttime = parameter.Starttime;
                newContractParameter.Endtime   = parameter.Endtime;
                newContractParameter.Degree    = parameter.Degree - 1;
                newContractParameter.PatientID = contactPatient.PatientID;

                patientStack.Push(newContractParameter);
            }
        }
示例#5
0
        public ContactModel Process(ContactParameter parameter)
        {
            patientStack = new Stack <ContactParameter>();
            contacts     = new ContactModel()
            {
                PatientMovements = new List <PatientMovementModel>(), LaborData = new List <LabDataModel>()
            };
            currentDegree = 1;

            patientStack.Push(parameter);

            DegreeIterator();
            _logger.LogDebug(contacts.PatientMovements.ToString());
            _logger.LogDebug(contacts.LaborData.ToString());
            return(contacts);
        }
示例#6
0
 private bool isValidTimeSlot(ContactPatientModel contactPatient, ContactParameter parameter)
 {
     return(contactPatient.Ende > parameter.Starttime || contactPatient.Beginn < parameter.Endtime);
 }
示例#7
0
        private ContactPatientsParameter SecondParameterConstructor(PatientWardModel patientWard, ContactParameter baseParameter)
        {
            ContactPatientsParameter contactPatients = new ContactPatientsParameter(baseParameter, patientWard);

            return(contactPatients);
        }