public IdentityUnitOfWork(string connectionString) { db = new ApplicationContext(connectionString); userManager = new ApplicationUserManager(new UserStore <ApplicationUser>(db)); roleManager = new ApplicationRoleManager(new RoleStore <ApplicationRole>(db)); studentRepository = new StudentRepository(db); studyRepository = new StudyRepository(db); }
public PatientController(IPatientRepository patientRepository, IRoomRepository roomRepository, IUnitOfWork unitOfWork, IMapper mapper, IDoctorPatientRepository doctorPatientRepository, IStudyRepository studyRepository) { _patientRepository = patientRepository; _roomRepository = roomRepository; _unitOfWork = unitOfWork; _mapper = mapper; _doctorPatientRepository = doctorPatientRepository; _studyRepository = studyRepository; }
/// <inheritdoc /> public ConsentControllerTestBase() { Study = Create.Study; StudyId = new StudyIdentity(Study.Id); StudySubject = new StudySubject(StudyId, "AA100023", new PersonIdentity(500L)); Studies = CreateStudyRepository(Study); StudySubjects = CreateSubjectRepository(Study, StudySubject); Consents = CreateConsentRepository(Study, StudySubject); }
public ConsentController( IStudyRepository studies, IStudySubjectRepository subjects, IConsentRepository consents, EvidenceDefinitionRegistry registry, ILogger <ConsentController> logger = null) { Studies = studies; Subjects = subjects; Logger = logger ?? NullLogger <ConsentController> .Instance; Consents = consents; EvidenceDtoMarshallers = new EvidenceDtosIdentifierDtoMarshaller(registry); }
public StudyEventHandler(IStudyRepository studyRepository, IEventPublisher eventPublisher) { _handlers = new Dictionary <Type, Action <Event> >(); _handlers.Add(typeof(StudyCreatedEvent), (e) => Handle((StudyCreatedEvent)e)); _handlers.Add(typeof(AccessionNumberChangedEvent), (e) => Handle((AccessionNumberChangedEvent)e)); _handlers.Add(typeof(StudyReviewedEvent), (e) => Handle((StudyReviewedEvent)e)); // TODO: Separate validation rules into its own object so that they can be managed separately _validationRules = new List <IValidationRule>() { new PrefixAccessionNumberValidationRule() { Prefix = "30-", Option = PrefixAccessionNumberValidationRule.PrefixOption.DoesNotStartWith } }; _studyRepository = studyRepository; _eventPublisher = eventPublisher; }
/// <inheritdoc /> public StudiesModel( IStudyRepository studies, IStudySubjectRepository subjects, IConsentRepository consent, IIdentityRepository identityRepository, IdentifierDefinitionRegistry identifierDefinitionRegistry, IUserProvider user, IOptions <IdentifierDisplayOptions> displayOptionsProvider, ILogger <StudiesModel> logger ) { Studies = studies; Subjects = subjects; Logger = logger; this.user = user; this.consent = consent; this.identityRepository = identityRepository; this.identifierDefinitionRegistry = identifierDefinitionRegistry; displayOptions = displayOptionsProvider.Value; SearchGroups = GetDefinedSearchGroups(); }
public StudyService(IStudyRepository studyRepository) { _studyRepository = studyRepository; }
public StudiesController(IStudyRepository repository) { _repository = repository; }
public StudyController(IStudyRepository repository, ILogger <StudyController> log) { _repository = repository; _log = log; }
public Importer(IStudyRepository studyRepo, IDicomFileRepository fileRepo) { _studyRepo = studyRepo; _fileRepo = fileRepo; }
public StudysController(IStudyRepository studyRepository, IGradeRepository gradeRepository) { _studyRepository = studyRepository; _gradeRepository = gradeRepository; }
public StudyCreatedEventHandler(IStudyRepository repo) { _repo = repo; }
/// <inheritdoc /> public IndexModel(IStudyRepository consent, IUserProvider user) { Consent = consent; this.user = user; }
/// <inheritdoc /> public ConsentRepositoryTests(ITestOutputHelper outputHelper, DatabaseFixture fixture) : base(outputHelper, fixture) { readContext = CreateNewContextInSameTransaction(); updateContext = CreateNewContextInSameTransaction(); createContext = CreateNewContextInSameTransaction(); study = createContext.Studies.Add(new StudyEntity { Name = Random.String() }).Entity; var consentedPerson = createContext.People.Add(new PersonEntity()).Entity; consentedStudySubject = createContext.Add(new StudySubjectEntity { Study = study, Person = consentedPerson, SubjectIdentifier = "Consented" }).Entity; createContext.Add( new ConsentEntity { StudySubject = consentedStudySubject, DateProvided = 1.December(1965), DateWithdrawn = 1.January(1966), GivenBy = consentedPerson }); activeConsent = createContext.Add( new ConsentEntity { StudySubject = consentedStudySubject, DateProvided = 1.February(1966), GivenBy = consentedPerson }).Entity; var unconsentedPerson = createContext.People.Add(new PersonEntity()).Entity; createContext.Add( new StudySubjectEntity { Study = study, Person = unconsentedPerson, SubjectIdentifier = "Unconsented" }); var withdrawnConsent = createContext.Add(new PersonEntity()).Entity; var withdrawnSubject = createContext.Add( new StudySubjectEntity { Study = study, Person = withdrawnConsent, SubjectIdentifier = "Withdrawn" }).Entity; withdrawnSubjectWithdrawnDate = 5.January(2018); createContext.Add(new ConsentEntity { StudySubject = withdrawnSubject, DateProvided = 1.December(2017), DateWithdrawn = withdrawnSubjectWithdrawnDate, GivenBy = withdrawnConsent }); createContext.SaveChanges(); studyId = new StudyIdentity(study.Id); consentedPersonId = consentedPerson; unconsentedPersonId = unconsentedPerson; withdrawnPersonId = withdrawnConsent; consents = CreateConsentRepository(readContext); studySubjects = CreateStudySubjectRepository(readContext); studies = CreateStudyRepository(readContext); }