public async Task <List <Procedure> > GetProceduresAsync(List <string> codes)
        {
            var client = _httpClientFactory.CreateClient();

            var result = new List <Procedure>();

            var adapter = new TreatmentCodeAdapter(client);

            foreach (var code in codes)
            {
                var procedure = await adapter.ToProcedureAsync(
                    _options.Endpoint,
                    code);

                if (procedure != null)
                {
                    result.Add(procedure);
                }
            }

            return(result);
        }
        public async Task <List <Diagnosis> > GetDiagnosesAsync(List <string> codes)
        {
            var client = _httpClientFactory.CreateClient();

            var result = new List <Diagnosis>();

            var adapter = new TreatmentCodeAdapter(client);

            foreach (var code in codes)
            {
                var diagnosis = await adapter.ToDiagnosisAsync(
                    _options.Endpoint,
                    code);

                if (diagnosis != null)
                {
                    result.Add(diagnosis);
                }
            }

            return(result);
        }
        public async Task <List <Medicine> > GetMedicinesAsync(List <string> codes)
        {
            var client = _httpClientFactory.CreateClient();

            var apiEndpoint = await GetCodesService();

            var result = new List <Medicine>();

            var adapter = new TreatmentCodeAdapter(client);

            foreach (var code in codes)
            {
                var medicine = await adapter.ToMedicineAsync(
                    apiEndpoint?.ToString() ?? _options.Endpoint,
                    code);

                if (medicine != null)
                {
                    result.Add(medicine);
                }
            }

            return(result);
        }