示例#1
0
        private static Patient MapPatient(Domain2.Patients.Patient source)
        {
            if (source == null)
            {
                return(null);
            }
            var result = new Patient
            {
                Gender                       = GetGender(source.Gender),
                ID                           = source.ID,
                PatientAddress1              = source.Address1,
                PatientAddress2              = source.Address2,
                PatientCity                  = source.City,
                PatientFirstName             = source.FirstName,
                PatientGuardian2FirstName    = source.Guardian2FirstName,
                PatientGuardian2LastName     = source.Guardian2LastName,
                PatientGuardian2Phone        = source.Guardian2HomePhone,
                PatientGuardian2Relationship = GetGuardianRelationship(source.Guardian2RelationshipID),
                PatientGuardianFirstName     = source.GuardianFirstName,
                PatientGuardianLastName      = source.GuardianLastName,
                PatientGuardianPhone         = source.GuardianHomePhone,
                PatientGuardianRelationship  = GetGuardianRelationship(source.GuardianRelationshipID),
                PatientLastName              = source.LastName,
                PatientState                 = source.State,
                PatientZip                   = source.Zip
            };

            return(result);
        }
示例#2
0
 private Patient getPatient(Domain2.Patients.Patient patient)
 {
     if (patient == null)
     {
         throw new ArgumentNullException("patient");
     }
     return(patientMapping.FromDomain(patient));
 }
示例#3
0
        private static Domain2.Patients.Patient ReferralToPatient(Referral r)
        {
            var p = new Domain2.Patients.Patient
            {
                Address1                = r.Address1,
                Address2                = r.Address2,
                City                    = r.City,
                DateCreated             = DateTime.UtcNow,
                DateOfBirth             = r.DateOfBirth,
                Email                   = r.Email,
                FirstName               = r.FirstName,
                Gender                  = r.Gender,
                GeneratingReferralID    = r.ID,
                GuardianFirstName       = r.GuardianFirstName,
                GuardianLastName        = r.GuardianLastName,
                GuardianRelationshipID  = r.GuardianRelationshipID,
                GuardianEmail           = r.GuardianEmail,
                GuardianCellPhone       = r.GuardianCellPhone,
                GuardianHomePhone       = r.GuardianHomePhone,
                GuardianWorkPhone       = r.GuardianWorkPhone,
                GuardianNotes           = r.GuardianNotes,
                Guardian2FirstName      = r.Guardian2FirstName,
                Guardian2LastName       = r.Guardian2LastName,
                Guardian2Email          = r.Guardian2Email,
                Guardian2CellPhone      = r.Guardian2CellPhone,
                Guardian2HomePhone      = r.Guardian2HomePhone,
                Guardian2WorkPhone      = r.Guardian2WorkPhone,
                Guardian2RelationshipID = r.Guardian2RelationshipID,
                Guardian2Notes          = r.Guardian2Notes,
                Guardian3FirstName      = r.Guardian3FirstName,
                Guardian3LastName       = r.Guardian3LastName,
                Guardian3RelationshipID = r.Guardian3RelationshipID,
                Guardian3CellPhone      = r.Guardian3CellPhone,
                Guardian3HomePhone      = r.Guardian3HomePhone,
                Guardian3WorkPhone      = r.Guardian3WorkPhone,
                Guardian3Email          = r.Guardian3Email,
                Guardian3Notes          = r.Guardian3Notes,
                PhysicianName           = r.PhysicianName,
                PhysicianAddress        = r.PhysicianAddress,
                PhysicianEmail          = r.PhysicianEmail,
                PhysicianContact        = r.PhysicianContact,
                PhysicianFax            = r.PhysicianFax,
                PhysicianNotes          = r.PhysicianNotes,
                PhysicianPhone          = r.PhysicianPhone,
                InsuranceCompanyName    = r.InsuranceCompanyName,
                InsuranceMemberID       = r.InsuranceMemberID,
                InsurancePrimaryCardholderDateOfBirth = r.InsurancePrimaryCardholderDOB,
                InsuranceCompanyProviderPhone         = r.InsuranceProviderPhone,
                PrimarySpokenLangauge = r.PrimaryLanguage,
                LastName = r.LastName,
                Phone    = r.Phone,
                State    = r.State,
                Zip      = r.ZipCode
            };

            return(p);
        }
        //[TestMethod]
        //public void AuthResolverRemovesExistingBreakdowns() {

        //}

        //[TestMethod]
        //public void AuthResolverNoAuthsIfNoInsurance() {

        //}

        //[TestMethod]
        //public void AuthResolveNoAuthsIfNoInsuranceAuthMatchRules() {

        //}

        //[TestMethod]
        //public void AuthResolverMatchesRulesOnServiceAndProviderType() {

        //}

        private static Mock<IResolutionServiceRepository> CreateMockResolutionServiceRepository()
        {
            var repoMock = new Mock<IResolutionServiceRepository>();
            var c = new Domain2.Cases.Case();
            var patient = new Domain2.Patients.Patient();
            var insurance = new Domain2.Insurances.Insurance();

            c.Patient = patient;
            patient.Insurance = insurance;

            repoMock.Setup(x => x.GetCase(It.IsAny<int>())).Returns(c);
            repoMock.Setup(x => x.GetActiveInsurance(It.IsAny<int>(), It.IsAny<DateTime>())).Returns(c.Patient.Insurance);
            return repoMock;
        }
示例#5
0
 public AuthResolver(Domain2.Hours.Hours hours)
 {
     _hours   = hours;
     _case    = hours.Case;
     _patient = _case.Patient;
 }