public static async Task <Guid> SubmitSample(StanlabApi stanlab) { var command = new SubmitSampleRequest { ObservationFacilityId = "396b071b-6488-485a-8d9e-bcff45079d56", // Renseanlæg: Hirtshals - Afløb Location = "", Purpose = 1, // Egenkontrol Type = 2, // Mængdeproportional prøve Matrix = 1, // Vand Label = "Prøve nr. 1 af 12", Sampling = new Sampling { Sampler = new Actor { Company = "DK29809577", Person = "Christian Lykke" }, Method = 0, // Ikke oplyst Equipment = 0, // Ikke oplyst Remarks = "Prøven var meget uklar i forhold til hvad den plejer at være...", SamplingStarted = DateTime.Now.AddDays(-2), SamplingEnded = DateTime.Now.AddDays(-1) }, Measurements = new List <Measurement> { new Measurement { Parameter = 1155, // Vandføring Unit = 33, // m3/d Method = 0, // Ikke oplyst Accredited = false, Attribute = null, Value = 12000, Time = DateTime.Now, Performer = "Miljøstyrelsens Laboratorium - DANAK 556" } }, Observations = new List <Observation> { new Observation { Parameter = 1894, // Farve, vandfase StancodeList = 1060, // Farve (kodeliste) Stancode = 3, // Gullig Performer = "Miljøstyrelsens Laboratorium - DANAK 556" } } }; return(await stanlab.SubmitSampleAsync("puls", command)); }
public override Task <Guid> SubmitSample([FromBody] SubmitSampleRequest body) { var sampleId = _repository.SaveSampleRequest(body); return(Task.FromResult(sampleId)); }