This project provides C# validators and generators for Australian Health Identifiers, including:
- Individual Healthcare Identifier (IHI)
- Healthcare Provider Identifier - Individual (HPI-I)
- Healthcare Provider Identifier - Organisation (HPI-O)
- AHPRA Number
- Medicare Card Number
- Veterans' Affairs (DVA) Number
- Provider Number
- Prescriber Number
You can install the package via NuGet Package Manager with the following command:
Install-Package AuHealthIdentifiersOr via the .NET CLI:
dotnet add package AuHealthIdentifiersHere's a quick example of how to use the library to validate and generate an Individual Healthcare Identifier (IHI):
using AuHealthIds;
IndividualHealthIdentifier id = new IndividualHealthIdentifier();
var isValid = id.IsValid("800360123456789"); // returns true if valid
var newId = id.Generate(); // generates a new conformant IHISimilar classes and methods are available for other identifier types.
The library also includes a static class IdentifierTools for simple validation:
using AuHealthIds;
IdentifierTools.ValidateId(IdentiferType.IHI, "800360123456789"); // returns true if validand extension methods for strings:
using AuHealthIds;
var isValid = "800360123456789".IsValidIhi(); // returns true if validThe library targets .NET Standard 2.0, making it compatible with a wide range of .NET implementations including .NET Core and .NET Framework..
Contributions are welcome! Please fork the repository and submit a pull request with your changes. Please include unit tests for any new validators/fixes.
For major changes, please open an issue first to discuss what you would like to change.
-
Details of the algorithms used in this project are based on the descriptions by Jamie Curmi. These descriptions made understanding how these identifiers are structured and validated a cinch!
-
Nuget Icon - Icard icons created by HAJICON - Flaticon
This project is licensed under the MIT License - see the LICENSE file for details.
The nuget icon is licensed under the free Flaticon License for personal and commercial purpose with attribution.
