예제 #1
0
 private void AddFacilityPhysician(string personId)
 {
     foreach (var selectedPhysician in SelectedPhysicians)
     {
         //DateAcquired only serves as certification
         var newFacilityPhysician = new FacilityPhysician
         {
             PhysicianId  = selectedPhysician.PersonId,
             FacilityId   = personId,
             DateAssigned = DateTime.Now
         };
         _facilityPhysicianService.AddFacilityPhysician(newFacilityPhysician);
     }
 }
 private void AddFacilityPhysicians(string personId)
 {
     foreach (var selectedFacility in SelectedFacilities)
     {
         //Assumes that assigning physicians to their respective facilities are on the same date/time
         //as their registration to the system
         var newFacilityPhysician = new FacilityPhysician
         {
             FacilityId   = selectedFacility.FacilityId,
             PhysicianId  = personId,
             DateAssigned = DateTime.Now
         };
         _facilityPhysicianService.AddFacilityPhysician(newFacilityPhysician);
     }
 }
예제 #3
0
        public void AddFacilityPhysicianTest()
        {
            var serv = new FacilityPhysicianService(new MVCHContext());

            serv.AddFacilityPhysician(new FacilityPhysician
            {
                PhysicianId  = "PER-000020",
                FacilityId   = "FAC-000001",
                DateAssigned = DateTime.Now
            });
            serv.AddFacilityPhysician(new FacilityPhysician
            {
                PhysicianId  = "PER-000019",
                FacilityId   = "FAC-000002",
                DateAssigned = DateTime.Now
            });
            serv.AddFacilityPhysician(new FacilityPhysician
            {
                PhysicianId  = "PER-000018",
                FacilityId   = "FAC-000003",
                DateAssigned = DateTime.Now
            });
            serv.AddFacilityPhysician(new FacilityPhysician
            {
                PhysicianId  = "PER-000017",
                FacilityId   = "FAC-000004",
                DateAssigned = DateTime.Now
            });
            serv.AddFacilityPhysician(new FacilityPhysician
            {
                PhysicianId  = "PER-000016",
                FacilityId   = "FAC-000005",
                DateAssigned = DateTime.Now
            });
            serv.AddFacilityPhysician(new FacilityPhysician
            {
                PhysicianId  = "PER-000015",
                FacilityId   = "FAC-000006",
                DateAssigned = DateTime.Now
            });
            serv.AddFacilityPhysician(new FacilityPhysician
            {
                PhysicianId  = "PER-000014",
                FacilityId   = "FAC-000007",
                DateAssigned = DateTime.Now
            });
            serv.AddFacilityPhysician(new FacilityPhysician
            {
                PhysicianId  = "PER-000013",
                FacilityId   = "FAC-000008",
                DateAssigned = DateTime.Now
            });
            serv.AddFacilityPhysician(new FacilityPhysician
            {
                PhysicianId  = "PER-000012",
                FacilityId   = "FAC-000009",
                DateAssigned = DateTime.Now
            });
            serv.AddFacilityPhysician(new FacilityPhysician
            {
                PhysicianId  = "PER-000011",
                FacilityId   = "FAC-000010",
                DateAssigned = DateTime.Now
            });
        }