Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/dotnet-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
- uses: actions/checkout@v4
with:
repository: HicServices/RDMP
ref: v9.2.0-rc1
ref: develop
path: RDMP
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
dotnet-version: 10.0.x
- name: Get version
id: version
shell: cmd
Expand Down
2 changes: 1 addition & 1 deletion DrsPlugin/DrsPlugin.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<DebugType>embedded</DebugType>
<NeutralLanguage>en-GB</NeutralLanguage>
Expand Down
2 changes: 1 addition & 1 deletion GoDartsPluginUI/GoDartsPluginUI.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0-windows</TargetFramework>
<TargetFramework>net10.0-windows</TargetFramework>
<AssemblyTitle>GoDartsPluginUI</AssemblyTitle>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
Expand Down
2 changes: 1 addition & 1 deletion HIC.Demography/HIC.Demography.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<DebugType>embedded</DebugType>
Expand Down
12 changes: 9 additions & 3 deletions HICPlugin/DataFlowComponents/CHIColumnFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,15 @@ public void Check(ICheckNotifier notifier)
// True if date exists and checksum matches
private static bool ValidBits(int d, int m, int y, int c)
{
c %= 11;
if (c != 0) return false;

var modElevenCheck = c % 11;
if (modElevenCheck != 0)
{
var modTenCheck = c % 10;
if (modTenCheck != 0)
{
return false;
}
}
return m switch
{
1 or 3 or 5 or 7 or 8 or 10 or 12 => d is > 0 and < 32,
Expand Down
5 changes: 4 additions & 1 deletion HICPlugin/HICPlugin.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<AssemblyTitle>HICPlugin</AssemblyTitle>
<Product>HICPlugin</Product>
<Copyright>Copyright © 2016</Copyright>
Expand Down Expand Up @@ -40,6 +40,9 @@
<ItemGroup>
<None Include="Resources\MTo1.png" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Resources.Extensions" Version="10.0.5" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\RDMP\Rdmp.Core\Rdmp.Core.csproj" />
<ProjectReference Include="..\HIC.Demography\HIC.Demography.csproj" />
Expand Down
86 changes: 43 additions & 43 deletions HICPlugin/Mutilators/CHIMutilator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,50 +60,50 @@ private static string CreateCHIFunction()
CREATE FUNCTION [dbo].[checkCHI](@CHI as varchar(255))
RETURNS bit AS
BEGIN

DECLARE @SumTotal int
DECLARE @CheckDigit int
DECLARE @Result bit
DECLARE @i int
SET @i = 0
SET @SumTotal = 0
SET @Result = 0
--return 0 if the CHI is non-numeric
IF(ISNUMERIC(@CHI) <> 1)
RETURN 0

--return 0 if the day of birth is greater than 31
IF(LEFT(@CHI, 2) > 31)
RETURN 0

--return 0 if the month of birth is greater than 12
IF(SUBSTRING(@CHI, 3, 2) > 12)
RETURN 0

--return 0 if the CHI is not 10 digits long
IF(LEN(@CHI) = 10)
BEGIN
--Calculate the sum
WHILE @i < 9
BEGIN
SET @SumTotal = @SumTotal + (convert(int,substring(@CHI,@i+1,1)) * (10 - @i))
SET @i = @i + 1
END

--Obtain Check Digit
SET @CheckDigit = 11 - (@SumTotal % 11)

IF @CheckDigit = 11
SET @CheckDigit = 0

--Compare Check Digit
IF @CheckDigit = convert(int,substring(@CHI,10,1))
SET @Result = 1

RETURN @Result
END

RETURN 0
  DECLARE @CheckDigit11Mod int
  DECLARE @CheckDigit10Mod int
  DECLARE @Result bit
  DECLARE @i int
  SET @i = 0
  SET @SumTotal = 0
  SET @Result = 0
  --return 0 if the CHI is non-numeric
  SET @CHI=REPLACE(@CHI,'.','-') -- remove '.' from the CHI as ISNUMERIC will consider CHI a number even if it has '.'
  IF(ISNUMERIC(@CHI) <> 1)
    RETURN 0
  --return 0 if the CHI is not 10 digits long
  IF(LEN(@CHI) = 10)
  BEGIN
    --Calculate the sum
    WHILE @i < 9
    BEGIN
      SET @SumTotal = @SumTotal + (convert(int,substring(@CHI,@i+1,1)) * (10 - @i))
      SET @i = @i + 1
    END

    --Obtain Check Digit
    SET @CheckDigit11Mod = 11 - (@SumTotal % 11)

    SET @CheckDigit10Mod = 10 - (@SumTotal % 10)

    IF @CheckDigit11Mod = 11
      SET @CheckDigit11Mod = 0

    IF @CheckDigit10Mod = 10
      SET @CheckDigit10Mod = 0

    --Compare Check Digit
    IF @CheckDigit11Mod = convert(int,substring(@CHI,10,1))
      SET @Result = 1

    IF @CheckDigit10Mod = convert(int,substring(@CHI,10,1))
      SET @Result = 1

    RETURN @Result
  END

  RETURN 0
END
";
}
Expand Down
2 changes: 1 addition & 1 deletion HICPluginInteractive/HICPluginInteractive.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0-windows</TargetFramework>
<TargetFramework>net10.0-windows</TargetFramework>
<AssemblyTitle>HICPluginInteractive</AssemblyTitle>
<Product>HICPluginInteractive</Product>
<Copyright>Copyright © 2018</Copyright>
Expand Down
11 changes: 6 additions & 5 deletions HICPluginTests/HICPluginTests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0-windows</TargetFramework>
<TargetFramework>net10.0-windows</TargetFramework>
<AssemblyTitle>HICPluginTests</AssemblyTitle>
<Product>HICPluginTests</Product>
<Copyright>Copyright © 2016</Copyright>
Expand All @@ -13,12 +13,13 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
<PackageReference Include="NSubstitute" Version="5.3.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.9.2">
<PackageReference Include="NUnit.Analyzers" Version="4.11.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0" />
<PackageReference Include="NunitXml.TestLogger" Version="6.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="5.2.0" />
<PackageReference Include="NunitXml.TestLogger" Version="7.0.2" />
<PackageReference Include="System.Resources.Extensions" Version="10.0.5" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\RDMP\Tests.Common\Tests.Common.csproj" />
Expand Down Expand Up @@ -59,4 +60,4 @@
<LastGenOutput>TestReports.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>
</Project>
11 changes: 11 additions & 0 deletions HICPluginTests/Integration/CHIColumnFinderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,15 @@ public void IgnoreColumnsAvoidsCHIChecking()
_chiFinder.PreInitialize(_request, ThrowImmediatelyDataLoadEventListener.Quiet);
Assert.DoesNotThrow(() => _chiFinder.ProcessPipelineData(toProcess, _listener, null));
}

[Test]
public void CHIMod10Check()
{
using var toProcess = new DataTable();
toProcess.Columns.Add("Height");
toProcess.Columns.Add("CHI");
toProcess.Rows.Add(new object[] { 145, "0106851230" });
DataTable result;
var exc= Assert.Throws<Exception>(() => result = _chiFinder.ProcessPipelineData(toProcess, _listener, null));
}
}
3 changes: 2 additions & 1 deletion JiraPlugin/JiraPlugin.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<AssemblyTitle>JIRATicketing</AssemblyTitle>
<Company>Hewlett-Packard Company</Company>
<Product>JIRATicketing</Product>
Expand All @@ -13,6 +13,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="RestSharp" Version="112.1.0" />
<PackageReference Include="System.Resources.Extensions" Version="10.0.5" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\RDMP\Rdmp.Core\Rdmp.Core.csproj" />
Expand Down
1 change: 1 addition & 0 deletions Packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
| RestSharp | [GitHub](https://github.com/restsharp/RestSharp) | [Apache 2.0](https://github.com/restsharp/RestSharp/blob/dev/LICENSE.txt) | REST API wrapper | |
| System.ServiceModel.Http | [GitHub](https://github.com/dotnet/corefx) | [MIT](https://opensource.org/licenses/MIT) | Enables interaction with Web APIs (SciStore) | |
| Microsoft.XmlSerializer.Generator | [Microsoft](https://learn.microsoft.com/en-us/dotnet/core/additional-tools/xml-serializer-generator) | [MIT](https://opensource.org/licenses/MIT) | XML handling improvements |
| System.Resources.Extensions | [GitHub](https://github.com/dotnet/dotnet) | [MIT](https://opensource.org/licenses/MIT) | |
5 changes: 4 additions & 1 deletion Plugin/main/main.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<AssemblyTitle>Rdmp.Hic.Plugin</AssemblyTitle>
<Product>Rdmp.Hic.Plugin</Product>
<Copyright>Copyright © 2019</Copyright>
<DebugType>embedded</DebugType>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Resources.Extensions" Version="10.0.5" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\DrsPlugin\DrsPlugin.csproj" />
<ProjectReference Include="..\..\HICPlugin\HICPlugin.csproj" />
Expand Down
5 changes: 4 additions & 1 deletion Plugin/windows/windows.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{07F9F874-1306-4FE6-A03F-A483592BBC7F}</ProjectGuid>
<TargetFramework>net9.0-windows</TargetFramework>
<TargetFramework>net10.0-windows</TargetFramework>
<AssemblyTitle>Rdmp.Hic.Plugin</AssemblyTitle>
<Product>Rdmp.Hic.Plugin</Product>
<Copyright>Copyright © 2019</Copyright>
<DebugType>embedded</DebugType>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Resources.Extensions" Version="10.0.5" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\GoDartsPluginUI\GoDartsPluginUI.csproj" />
<ProjectReference Include="..\..\HICPluginInteractive\HICPluginInteractive.csproj" />
Expand Down
5 changes: 3 additions & 2 deletions SCIStorePlugin/SCIStorePlugin.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>

<AssemblyTitle>SCIStore</AssemblyTitle>
Expand Down Expand Up @@ -126,7 +126,8 @@
<Compile Include="..\SharedAssemblyInfo.cs" Link="SharedAssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.XmlSerializer.Generator" Version="9.0.7" />
<PackageReference Include="Microsoft.XmlSerializer.Generator" Version="10.0.0" />
<PackageReference Include="System.Resources.Extensions" Version="10.0.5" />
<PackageReference Include="System.ServiceModel.Http" Version="6.2.0" />
</ItemGroup>
<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
[assembly: AssemblyCulture("")]

// These should be overwritten by release builds
[assembly: AssemblyVersion("6.1.16")]
[assembly: AssemblyFileVersion("6.1.16")]
[assembly: AssemblyInformationalVersion("6.1.16")]
[assembly: AssemblyVersion("6.1.18")]
[assembly: AssemblyFileVersion("6.1.18")]
[assembly: AssemblyInformationalVersion("6.1.18")]
Loading