Skip to content

Commit b80c621

Browse files
authored
Merge pull request #8 from SKYWARE-Group/dev (v0.5.1)
v0.5.1
2 parents c751e01 + 4fd3f93 commit b80c621

File tree

9 files changed

+105
-42
lines changed

9 files changed

+105
-42
lines changed

BrokerClient48/BrokerClient48.csproj

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@
6666
<Reference Include="Microsoft.Extensions.Configuration.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
6767
<HintPath>..\packages\Microsoft.Extensions.Configuration.Abstractions.8.0.0\lib\net462\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath>
6868
</Reference>
69-
<Reference Include="Microsoft.Extensions.Configuration.FileExtensions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
70-
<HintPath>..\packages\Microsoft.Extensions.Configuration.FileExtensions.8.0.0\lib\net462\Microsoft.Extensions.Configuration.FileExtensions.dll</HintPath>
69+
<Reference Include="Microsoft.Extensions.Configuration.FileExtensions, Version=8.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
70+
<HintPath>..\packages\Microsoft.Extensions.Configuration.FileExtensions.8.0.1\lib\net462\Microsoft.Extensions.Configuration.FileExtensions.dll</HintPath>
7171
</Reference>
72-
<Reference Include="Microsoft.Extensions.Configuration.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
73-
<HintPath>..\packages\Microsoft.Extensions.Configuration.Json.8.0.0\lib\net462\Microsoft.Extensions.Configuration.Json.dll</HintPath>
72+
<Reference Include="Microsoft.Extensions.Configuration.Json, Version=8.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
73+
<HintPath>..\packages\Microsoft.Extensions.Configuration.Json.8.0.1\lib\net462\Microsoft.Extensions.Configuration.Json.dll</HintPath>
7474
</Reference>
75-
<Reference Include="Microsoft.Extensions.Configuration.UserSecrets, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
76-
<HintPath>..\packages\Microsoft.Extensions.Configuration.UserSecrets.8.0.0\lib\net462\Microsoft.Extensions.Configuration.UserSecrets.dll</HintPath>
75+
<Reference Include="Microsoft.Extensions.Configuration.UserSecrets, Version=8.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
76+
<HintPath>..\packages\Microsoft.Extensions.Configuration.UserSecrets.8.0.1\lib\net462\Microsoft.Extensions.Configuration.UserSecrets.dll</HintPath>
7777
</Reference>
7878
<Reference Include="Microsoft.Extensions.FileProviders.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
7979
<HintPath>..\packages\Microsoft.Extensions.FileProviders.Abstractions.8.0.0\lib\net462\Microsoft.Extensions.FileProviders.Abstractions.dll</HintPath>
@@ -88,10 +88,10 @@
8888
<HintPath>..\packages\Microsoft.Extensions.Primitives.8.0.0\lib\net462\Microsoft.Extensions.Primitives.dll</HintPath>
8989
</Reference>
9090
<Reference Include="Spectre.Console, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
91-
<HintPath>..\packages\Spectre.Console.0.48.0\lib\netstandard2.0\Spectre.Console.dll</HintPath>
91+
<HintPath>..\packages\Spectre.Console.0.49.1\lib\netstandard2.0\Spectre.Console.dll</HintPath>
9292
</Reference>
9393
<Reference Include="Spectre.Console.Json, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
94-
<HintPath>..\packages\Spectre.Console.Json.0.48.0\lib\netstandard2.0\Spectre.Console.Json.dll</HintPath>
94+
<HintPath>..\packages\Spectre.Console.Json.0.49.1\lib\netstandard2.0\Spectre.Console.Json.dll</HintPath>
9595
</Reference>
9696
<Reference Include="System" />
9797
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
@@ -117,8 +117,8 @@
117117
<Reference Include="System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
118118
<HintPath>..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
119119
</Reference>
120-
<Reference Include="System.Text.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
121-
<HintPath>..\packages\System.Text.Json.8.0.0\lib\net462\System.Text.Json.dll</HintPath>
120+
<Reference Include="System.Text.Json, Version=8.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
121+
<HintPath>..\packages\System.Text.Json.8.0.5\lib\net462\System.Text.Json.dll</HintPath>
122122
</Reference>
123123
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
124124
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>

BrokerClient48/packages.config

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@
55
<package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net48" />
66
<package id="Microsoft.Extensions.Configuration" version="8.0.0" targetFramework="net48" />
77
<package id="Microsoft.Extensions.Configuration.Abstractions" version="8.0.0" targetFramework="net48" />
8-
<package id="Microsoft.Extensions.Configuration.FileExtensions" version="8.0.0" targetFramework="net48" />
9-
<package id="Microsoft.Extensions.Configuration.Json" version="8.0.0" targetFramework="net48" />
10-
<package id="Microsoft.Extensions.Configuration.UserSecrets" version="8.0.0" targetFramework="net48" />
8+
<package id="Microsoft.Extensions.Configuration.FileExtensions" version="8.0.1" targetFramework="net48" />
9+
<package id="Microsoft.Extensions.Configuration.Json" version="8.0.1" targetFramework="net48" />
10+
<package id="Microsoft.Extensions.Configuration.UserSecrets" version="8.0.1" targetFramework="net48" />
1111
<package id="Microsoft.Extensions.FileProviders.Abstractions" version="8.0.0" targetFramework="net48" />
1212
<package id="Microsoft.Extensions.FileProviders.Physical" version="8.0.0" targetFramework="net48" />
1313
<package id="Microsoft.Extensions.FileSystemGlobbing" version="8.0.0" targetFramework="net48" />
1414
<package id="Microsoft.Extensions.Primitives" version="8.0.0" targetFramework="net48" />
1515
<package id="SharpZipLib" version="1.4.2" targetFramework="net48" />
16-
<package id="Spectre.Console" version="0.48.0" targetFramework="net48" />
17-
<package id="Spectre.Console.Json" version="0.48.0" targetFramework="net48" />
16+
<package id="Spectre.Console" version="0.49.1" targetFramework="net48" />
17+
<package id="Spectre.Console.Json" version="0.49.1" targetFramework="net48" />
1818
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
1919
<package id="System.Memory" version="4.5.5" targetFramework="net48" />
2020
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
2121
<package id="System.Runtime" version="4.3.1" targetFramework="net48" />
2222
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net48" />
2323
<package id="System.Text.Encodings.Web" version="8.0.0" targetFramework="net48" />
24-
<package id="System.Text.Json" version="8.0.0" targetFramework="net48" />
24+
<package id="System.Text.Json" version="8.0.5" targetFramework="net48" />
2525
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net48" />
2626
<package id="System.ValueTuple" version="4.5.0" targetFramework="net48" />
2727
</packages>

EventsModel/BaseMessage.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
namespace Skyware.Lis.EventsModel;
77

88
/// <summary>
9-
/// Base class for all messages produced by LIS iLab
9+
/// Base (abstract) class for all messages emitted by LIS iLab.
1010
/// </summary>
1111
public abstract class BaseMessage
1212
{
1313

1414
/// <summary>
15-
/// Default address where message should be send
15+
/// Default address where message should be send.
1616
/// </summary>
1717
public abstract string DefaultAddress { get; }
1818

@@ -22,37 +22,37 @@ public abstract class BaseMessage
2222
public string Id { get; set; } = Guid.NewGuid().ToString();
2323

2424
/// <summary>
25-
/// Date and time (UTC) when message is generated
25+
/// Date and time (UTC) when message is generated.
2626
/// </summary>
2727
public DateTime EventTime { get; set; } = DateTime.UtcNow;
2828

2929
/// <summary>
30-
/// Local date and time (according to receiver)
30+
/// Local date and time (according to receiver).
3131
/// </summary>
3232
public DateTime LocalEventTime => EventTime.ToLocalTime();
3333

3434
/// <summary>
35-
/// Origin application name
35+
/// Origin application name.
3636
/// </summary>
3737
public string OriginApp { get; set; }
3838

3939
/// <summary>
40-
/// Origin application version
40+
/// Origin application version.
4141
/// </summary>
4242
public string OriginAppVer { get; set; }
4343

4444
/// <summary>
45-
/// User Id (usually username) of the logged in operator
45+
/// User Id (usually username) of the logged in operator.
4646
/// </summary>
4747
public string OriginUserId { get; set; }
4848

4949
/// <summary>
50-
/// Host name of a computer where message is generated (usually it's NetBIOS name)
50+
/// Host name of a computer where message is generated (usually it's NetBIOS name).
5151
/// </summary>
5252
public string OriginHost { get; set; }
5353

5454
/// <summary>
55-
/// If LIS supports locations, <see cref="Location"/> where event is generated
55+
/// If LIS supports locations, <see cref="Location"/> where event is generated.
5656
/// </summary>
5757
public Location OriginLocation { get; set; }
5858

EventsModel/EventsModel.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
<PackageProjectUrl>https://github.com/SKYWARE-Group/EventsModel</PackageProjectUrl>
1414
<RepositoryUrl>https://github.com/SKYWARE-Group/EventsModel</RepositoryUrl>
1515
<RepositoryType>git</RepositoryType>
16-
<PackageTags>iLab;ActiveMQ;Events</PackageTags>
16+
<PackageTags>LIS;iLab;ActiveMQ;Events</PackageTags>
1717
<SignAssembly>False</SignAssembly>
18-
<Version>0.5.0</Version>
18+
<Version>0.5.1</Version>
1919
<PackageReadmeFile>readme.md</PackageReadmeFile>
2020
<RootNamespace>Skyware.Lis.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
2121
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace Skyware.Lis.EventsModel.Instruments;
6+
7+
/// <summary>
8+
/// Set of one or more test results for a sample, received from particular instrument
9+
/// </summary>
10+
public class InstrumentResults
11+
{
12+
13+
/// <summary>
14+
/// <see cref="Instrument"/> from which the results are received
15+
/// </summary>
16+
public Instrument Instrument { get; set; }
17+
18+
/// <summary>
19+
/// Approved results from the instrument
20+
/// </summary>
21+
public IEnumerable<ResultData> Results { get; set; }
22+
23+
}

EventsModel/Instruments/ResultApproval.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,30 @@
11
namespace Skyware.Lis.EventsModel.Instruments;
22

33
/// <summary>
4-
/// Occurs when test result is approved and sent to LIS
4+
/// Occurs when single test result is approved and sent to LIS.
55
/// </summary>
6+
/// <remarks>
7+
/// This event is emitted from communication applications (Iris, iLink, etc.)
8+
/// upon approval of a single test result.
9+
/// </remarks>
610
public class ResultApproval : BaseMessage
711
{
812

913
/// <inheritdoc/>
1014
public override string DefaultAddress => "topic://instruments/result-approvals";
1115

1216
/// <summary>
13-
/// <see cref="Instrument"/> from which the results are received
17+
/// <see cref="Instrument"/> from which the results are received.
1418
/// </summary>
1519
public Instrument Instrument { get; set; }
1620

1721
/// <summary>
18-
/// <see cref="Sample"/> being tested and approved
22+
/// <see cref="Sample"/> being tested and approved.
1923
/// </summary>
2024
public Sample Sample { get; set; }
2125

2226
/// <summary>
23-
/// Examination results being validated (<see cref="ResultData"/>)
27+
/// Examination results being validated (<see cref="ResultData"/>).
2428
/// </summary>
2529
public ResultData Data { get; set; }
2630

EventsModel/Instruments/Sample.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,32 @@ public class Sample
1010
{
1111

1212
/// <summary>
13-
/// SampleId (barcode) of a tube or vessel
13+
/// SampleId (barcode) of a tube or vessel.
1414
/// </summary>
1515
public string SampleId { get; set; }
1616

1717
/// <summary>
18-
/// Disk or rack identifier where sample is found in given instrument
18+
/// Disk or rack identifier where sample is found in given instrument.
1919
/// </summary>
2020
public string DiskOrRackId { get; set; }
2121

2222
/// <summary>
23-
/// Position in the disk/rack of the sample
23+
/// Position in the disk/rack of the sample.
2424
/// </summary>
2525
public string DiskOrRackPosition { get; set; }
2626

2727
/// <summary>
28-
/// Sequence number or any other identifier by which sample is known in the querying instrument
28+
/// Sequence number or any other identifier by which sample is known in the querying instrument.
2929
/// </summary>
3030
public string InstrumentSampleId { get; set; }
3131

3232
/// <summary>
33-
/// Code of the sample type a it is known to the instrument
33+
/// Code of the sample type a it is known to the instrument.
3434
/// </summary>
3535
public string InstrumentCode { get; set; }
3636

3737
/// <summary>
38-
/// Date of time when the sample is taken
38+
/// Date of time when the sample is taken.
3939
/// </summary>
4040
public DateTime? Taken { get; set; }
4141

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Collections.Generic;
2+
3+
namespace Skyware.Lis.EventsModel.Instruments;
4+
5+
/// <summary>
6+
/// Occurs when multiple test results are approved and sent to LIS.
7+
/// </summary>
8+
/// <remarks>
9+
/// This event is usually emitted from the Broker processor, which handles
10+
/// <see cref="ResultApproval"/> and combines many single approvals into
11+
/// composite one (with some time delay) to avoid many database (or other)
12+
/// interactions in case of massive approval.
13+
/// </remarks>
14+
public class SampleApproval : BaseMessage
15+
{
16+
17+
/// <inheritdoc/>
18+
public override string DefaultAddress => "topic://instruments/sample-approvals";
19+
20+
/// <summary>
21+
/// <see cref="Sample"/> being tested and approved.
22+
/// </summary>
23+
/// <remarks>
24+
/// Note that in this context this is a common sample, not the one specific to the instrument,
25+
/// therefore instrument specific data, such as Rack number, Rack position etc.
26+
/// may not be available event different instruments provide such information, if
27+
/// approved results for given sample are received from different instruments.
28+
/// </remarks>
29+
public Sample Sample { get; set; }
30+
31+
/// <summary>
32+
/// Results of the sample grouped by an instrument.
33+
/// </summary>
34+
public IEnumerable<InstrumentResults> Results { get; set; }
35+
36+
}

TestApp/TestApp.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
</PropertyGroup>
99
<ItemGroup>
1010
<PackageReference Include="Apache.NMS.ActiveMQ" Version="2.1.0" />
11-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
12-
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" />
13-
<PackageReference Include="Spectre.Console.Cli" Version="0.48.0" />
14-
<PackageReference Include="Spectre.Console.Json" Version="0.48.0" />
15-
<PackageReference Include="System.Text.Json" Version="8.0.0" />
11+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
12+
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.1" />
13+
<PackageReference Include="Spectre.Console.Cli" Version="0.49.1" />
14+
<PackageReference Include="Spectre.Console.Json" Version="0.49.1" />
15+
<PackageReference Include="System.Text.Json" Version="8.0.5" />
1616
</ItemGroup>
1717
<ItemGroup>
1818
<ProjectReference Include="..\EventsModel\EventsModel.csproj" />

0 commit comments

Comments
 (0)