public PhysicianLabTestModel Create(PhysicianLabTest physicianLabTest, IEnumerable <State> states)
 {
     return(new PhysicianLabTestModel
     {
         LabTestLicenseId = physicianLabTest.Id,
         IfobtLicenseNo = physicianLabTest.IfobtLicenseNo,
         MicroalbumineLicenseNo = physicianLabTest.MicroalbumineLicenseNo,
         DateCreated = physicianLabTest.DateCreated,
         State = states.Where(s => s.Id == physicianLabTest.StateId).Select(s => s.Name).FirstOrDefault(),
         StateId = physicianLabTest.StateId,
         IsActive = physicianLabTest.IsActive,
         IsDefault = physicianLabTest.IsDefault
     });
 }
Exemplo n.º 2
0
        public LabFormViewModel GetIfobtLabFormViewModel(Event eventData, Customer customer, Host host)
        {
            var physicianLabTests             = _physicianLabTestRepository.GetPhysicicanLabTestByStateId(host.Address.StateId);
            PhysicianLabTest physicianLabTest = null;

            if (!physicianLabTests.IsNullOrEmpty())
            {
                physicianLabTest = physicianLabTests.FirstOrDefault();
            }

            PhoneNumber customerPhoneNumber = null;

            if (customer.HomePhoneNumber != null && !string.IsNullOrEmpty(customer.HomePhoneNumber.Number))
            {
                customerPhoneNumber = customer.HomePhoneNumber;
            }
            Physician physician = null;

            if (physicianLabTest != null)
            {
                physician = _physicianRepository.GetPhysician(physicianLabTest.PhysicianId);
            }

            return(new LabFormViewModel
            {
                PatientName = customer.Name,
                Gender = customer.Gender != Gender.Unspecified ? customer.Gender.ToString() : string.Empty,
                DateOfBirth = customer.DateOfBirth,
                EventId = eventData.Id,
                EventDate = eventData.EventDate,
                PatientId = customer.CustomerId,
                PatientAddress = customer.Address,
                PatientPhone = customerPhoneNumber,
                PolicyHolderName = customer.Name,
                PolicyHolderAddress = customer.Address,
                PhysicianName = physician == null ? null : physician.Name,
                Npi = (physician == null || string.IsNullOrEmpty(physician.Npi)) ? string.Empty : physician.Npi,
                PhysicianAccountNumber = physicianLabTest != null ? physicianLabTest.IfobtLicenseNo : string.Empty
            });
        }
 public BiWeeklyMicroAlbuminFobtReportViewModel CreateModel(Customer customer, DateTime eventDate, bool fobtKit, bool microAlbuminKit, PhysicianLabTest physicianLabtest)
 {
     return(new BiWeeklyMicroAlbuminFobtReportViewModel
     {
         Market = customer.Market,
         MemberId = customer.InsuranceId,
         Gmpi = customer.AdditionalField3,                   //as report is for Wellmed , GMPI is AdditionalField3
         FirstName = customer.Name.FirstName,
         LastName = customer.Name.LastName,
         EventDate = eventDate.ToShortDateString(),
         FobtKit = fobtKit ? Yes : EmptyString,
         MicroalbuminKit = microAlbuminKit ? Yes : EmptyString,
         LabAccountNumber = physicianLabtest != null ? physicianLabtest.IfobtLicenseNo : NotAvailable,  //till date & as discussed ,both ifobt and microalbumin's licenseNo were same
         HfComment = EmptyString
     });
 }