UNPKG

@infect/infect-rda-sample-importer

Version:
56 lines (46 loc) 3.15 kB
import SampleProcessor from '../SampleProcessor.js'; import HTTP2Client from '@distributed-systems/http2-client'; import AnimalProcessor from '../field/AnimalProcessor.js'; import AnresisHumanMicroorganismProcessor from '../field/AnresisHumanMicroorganismProcessor.js'; import AnresisHumanRegionProcessor from '../field/AnresisHumanRegionProcessor.js'; import AnresisHumanSampleSourceProcessor from '../field/AnresisHumanSampleSourceProcessor.js'; import AnresisHumanSubstanceProcessor from '../field/AnresisHumanSubstanceProcessor.js'; import CountryProcessor from '../field/CountryProcessor.js'; import IsScreeningProcessor from '../field/IsScreeningProcessor.js'; import PatientAgeProcessor from '../field/PatientAgeProcessor.js'; import PatientAgeRangeProcessor from '../field/PatientAgeRangeProcessor.js'; import PatientSettingProcessor from '../field/PatientSettingProcessor.js'; import PatientSexProcessor from '../field/PatientSexProcessor.js'; import ResistanceProcessor from '../field/ResistanceProcessor.js'; import SampleCollectionDateProcessor from '../field/SampleCollectionDateProcessor.js'; import SampleSourceBloodProcessor from '../field/SampleSourceBloodProcessor.js'; import SampleSourceOtherProcessor from '../field/SampleSourceOtherProcessor.js'; import SampleSourceUrineProcessor from '../field/SampleSourceUrineProcessor.js'; import UniqueIdentifierProcessor from '../field/UniqueIdentifierProcessor.js'; export default class AnresisProcessor extends SampleProcessor { async load() { const httpClient = new HTTP2Client({ requestsPerSessionPerSecond: this.config.get('api-lookup.max-requests-per-second'), maxConcurrentRequests: this.config.get('api-lookup.max-concurrent-requests'), }); httpClient.host(this.config.get('core-data.host')); this.registerFieldProcessor(new AnimalProcessor({ httpClient })); this.registerFieldProcessor(new AnresisHumanMicroorganismProcessor({ httpClient })); this.registerFieldProcessor(new AnresisHumanRegionProcessor({ httpClient })); this.registerFieldProcessor(new AnresisHumanSampleSourceProcessor({ httpClient })); this.registerFieldProcessor(new AnresisHumanSubstanceProcessor({ httpClient })); this.registerFieldProcessor(new CountryProcessor({ httpClient })); this.registerFieldProcessor(new IsScreeningProcessor()); this.registerFieldProcessor(new PatientAgeProcessor()); this.registerFieldProcessor(new PatientAgeRangeProcessor()); this.registerFieldProcessor(new PatientSettingProcessor({ httpClient })); this.registerFieldProcessor(new PatientSexProcessor({ httpClient })); this.registerFieldProcessor(new ResistanceProcessor()); this.registerFieldProcessor(new SampleCollectionDateProcessor()); this.registerFieldProcessor(new SampleSourceBloodProcessor()); this.registerFieldProcessor(new SampleSourceOtherProcessor()); this.registerFieldProcessor(new SampleSourceUrineProcessor()); this.registerFieldProcessor(new UniqueIdentifierProcessor()); await super.load(); } }