TotallyTech.FHIR 1.0.4
Here's a comprehensive README.md file tailored for your project, incorporating the setup and usage instructions, configuration details from the appsettings.json, and how to integrate the CreateEligibilityRequest functionality.
README.md for Create Eligibility Request Service
Create Database
add this in your dbcontext ( name dbcontext you can use it as inherit FHIRDbContext)
Create Eligibility Request Service for HL7 FHIR
This service provides a comprehensive solution for handling HL7 FHIR coverage eligibility requests in healthcare applications. It simplifies the creation, validation, and processing of FHIR resources such as Patients, Organizations, Coverages, and Coverage Eligibility Requests. The service supports various types of eligibility requests based on national ID, passport, birth certificate, and more.
Features
FHIR Resource Creation: Automatically creates and manages Patient, Organization, Coverage, and Coverage Eligibility Request resources.
Support for Multiple Request Types: Handles different eligibility request types including validation, benefits, and discovery purposes.
Bundle Processing: Creates FHIR bundles and sends them to the relevant endpoint for processing.
Error Handling: Provides detailed error messages and response simplification for easy integration.
Installation
To use the CreateEligibilityRequest service, ensure you have integrated the necessary dependencies in your .NET application:
Install-Package Hl7.Fhir.R4
Install-Package YourFhirServicePackage
Configuration
1. AppSettings
Ensure your appsettings.json is configured with the necessary dhamani and FHIR server settings:
{
"dhamaniSettings": {
"ApiAddress": "https://up.dhamani.om/integrator/$process-message",
"ClientCertSubjectCN": "PRV-PROV0002",
"AccessKey": "65788464-725c-447b-baef-90233fff49be"
},
"FhirServer": {
"Url": "https://staging.hospogate.com/fhir"
}
}
2. Register Services
Register the necessary FHIR services in your Startup.cs or Program.cs:
public void ConfigureServices(IServiceCollection services)
{
services.Configure(Configuration.GetSection("dhamaniSettings"));
services.Configure(Configuration.GetSection("FhirServer"));
services.AddScoped();
services.AddScoped();
services.AddScoped();
}
Usage
3. Creating an Eligibility Request
To create an eligibility request, use the CreateEligibilityRequest endpoint in your application. This can be done by sending a POST request to the API.
API Endpoint
POST /api/CoverageEligibilityRequest/CreateEligibilityRequest
Request Parameters
requestType: The type of eligibility request. Options include:CivilIdBenefitsAndValidationsCivilIdDiscoveryBirthCertificateValidationBirthCertificateValidationAndBenefitsBirthCertificateDiscoveryPassportValidationPassportValidationAndBenefitsPassportDiscoveryrequestDto: ACoverageEligibilityRequestDtoobject containing details for the Patient, Provider, Insurer, and Coverage.clinicCodePreFix: A string to prefix the clinic code, defaulting to"GMC".
Example Request Body
{
"requestType": "CivilIdBenefitsAndValidations",
"requestDto": {
"PatientDetails": {
"Identity": "example-patient-dhamani-5",
"NationalId": "917922282",
"FamilyName": "Munir",
"GivenName": "Abdul Mubdee",
"MiddleName": "Mahja",
"Prefix": "Mr.",
"Suffix": "Jr.",
"MobileNumber": "+96890644522",
"BirthDate": "1979-08-13",
"Gender": "Male"
},
"ProviderDetails": {
"License": "PRV-PROV0002",
"Name": "Golden Medical Center"
},
"InsurerDetails": {
"License": "LICNS-00014",
"Name": "OQIC"
},
"CoverageDto": {
"IdentifierValue": "MEM24006160",
"Status": "Active",
"TypeCode": "EHCPOL",
"TypeDisplay": "Extended healthcare",
"RelationshipCode": "self",
"PeriodStart": "2023-01-01",
"PeriodEnd": "2023-12-31"
}
},
"clinicCodePreFix": "GMC"
}
4. Handling the Response
The response will contain a simplified version of the data processed, including details about the eligibility request, patient, provider, and insurer.
Example Success Response
{
"bundle": {
"id": "bundle-id"
},
"EligibilityResponse": {
"id": "response-id",
"Outcome": "complete",
"Disposition": "The request has been processed successfully."
},
"Patient": {
"ID": "patient-id",
"Name": "Abdul Mubdee Munir",
"NationalID": "917922282",
"BirthDate": "1979-08-13",
"PhoneNumber": "+96890644522"
},
"Coverage": {
"ID": "coverage-id",
"Type": "Extended healthcare",
"Status": "Active",
"Period": "2023-01-01 to 2023-12-31"
},
"Provider": {
"Name": "Golden Medical Center",
"License": "PRV-PROV0002"
},
"Insurer": {
"Name": "OQIC",
"License": "LICNS-00014"
}
}
Error Handling
If there are errors during processing, the service will return detailed error messages that help in debugging and correcting the request.
Example Error Response
{
"message": "Eligibility request processing error.",
"errors": [
"Error Code: BV-00392, Display: process with this Civil Id Queued."
]
}
No packages depend on TotallyTech.FHIR.
.NET 8.0
- Hl7.Fhir.R4 (>= 5.9.1)
- Hl7.Fhir.Validation.Legacy.R4 (>= 5.9.0)
- HttpClientToCurl (>= 2.0.6)
- Microsoft.AspNetCore.Http.Features (>= 5.0.17)
- Microsoft.EntityFrameworkCore (>= 8.0.8)
- Microsoft.EntityFrameworkCore.SqlServer (>= 8.0.8)
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection (>= 8.0.0)
- Microsoft.Extensions.Http (>= 8.0.0)
| Version | Downloads | Last updated |
|---|---|---|
| 1.2.22 | 36 | 10/9/2024 |
| 1.1.22 | 10 | 10/9/2024 |
| 1.1.21 | 13 | 10/9/2024 |
| 1.0.21 | 37 | 9/30/2024 |
| 1.0.20 | 15 | 9/30/2024 |
| 1.0.19 | 13 | 9/29/2024 |
| 1.0.18 | 14 | 9/28/2024 |
| 1.0.17 | 11 | 9/26/2024 |
| 1.0.16 | 11 | 9/26/2024 |
| 1.0.15 | 11 | 9/26/2024 |
| 1.0.14 | 13 | 9/26/2024 |
| 1.0.13 | 11 | 9/26/2024 |
| 1.0.12 | 11 | 9/25/2024 |
| 1.0.11 | 13 | 9/25/2024 |
| 1.0.10 | 11 | 9/25/2024 |
| 1.0.8 | 9 | 9/25/2024 |
| 1.0.7 | 10 | 9/24/2024 |
| 1.0.6 | 14 | 9/24/2024 |
| 1.0.5 | 13 | 9/24/2024 |
| 1.0.4 | 13 | 9/22/2024 |
| 1.0.3 | 13 | 9/22/2024 |
| 1.0.2 | 11 | 9/19/2024 |
| 1.0.1 | 10 | 9/10/2024 |
| 1.0.0 | 11 | 8/29/2024 |