public static MedikitServerBuilder ImportTableReference(this MedikitServerBuilder builder, string path)
        {
            var referenceTables = new ConcurrentBag <KMEHRReferenceTable>();
            var files           = Directory.GetFiles(path, "*.xml", SearchOption.AllDirectories);

            foreach (var file in files)
            {
                referenceTables.Add(Extract(file));
            }

            builder.Services.AddSingleton <IKMEHRReferenceTableQueryRepository>(new InMemoryKMEHRReferenceTableQueryRepository(referenceTables));
            return(builder);
        }
 public static MedikitServerBuilder AddMedicalfiles(this MedikitServerBuilder builder, ConcurrentBag <MedicalfileAggregate> medicalfiles)
 {
     builder.Services.AddSingleton <IMedicalfileCommandRepository>(new InMemoryMedicalfileCommandRepository(medicalfiles));
     builder.Services.AddSingleton <IMedicalfileQueryRepository>(new InMemoryMedicalfileQueryRepository(medicalfiles));
     return(builder);
 }
 public static MedikitServerBuilder AddPatients(this MedikitServerBuilder builder, ConcurrentBag <PatientAggregate> patients)
 {
     builder.Services.AddSingleton <IPatientCommandRepository>(new InMemoryPatientCommandRepository(patients));
     builder.Services.AddSingleton <IPatientQueryRepository>(new InMemoryPatientQueryRepository(patients));
     return(builder);
 }