Overview
The eligibility operation validates patient coverage and retrieves member information from the health insurance system. This is typically the first operation performed before registering medical services.Operation Method
Hl7Service.java:26-37
Endpoint URL: Retrieved via EnvironmentConfig.getHl7ElegibilidadUrl()
Request Structure
ElegibilidadRequest
The request object contains operation data, technical parameters, and provider information.Operation Data Fields
Operation mode. Single character field (max length: 1)
Credential number. Fixed length: 19 characters
Registration timestamp in format:
yyyy-MM-dd'T'HH:mm:ssService date in format:
yyyy-MM-ddManual processing indicator. Enum values:
MANUAL(“0”)CAPITADOR(“C”)COMSULTA(“L”)
Technical Data Fields
External ticket number for tracking
Terminal identifier
Internal transaction number
Provider Fields
Provider CUIT (tax identification number)
Provider registration origin
Previous Result Fields
Previous authorization number if applicable
Previous rejection code if applicable
Example Request
Response Structure
ElegibilidadResponse
The response contains member information and eligibility status.Member Information
Patient’s full name (last name and first name)
Patient Medical Identifier
Patient age
Patient sex
Authorized sex value
Authorized gender value
Coverage Information
Plan code identifier
Tax status indicator
Tax law applicability
Transaction Data
Transaction identifier
Transaction registration timestamp
Rejection Fields
Header rejection code. Critical: If this value is greater than 0, the eligibility check is rejected.
Human-readable rejection description
Diagnostic Information
ICD code description
Example Response (Approved)
Example Response (Rejected)
Validation Logic
The service validates the response using the following rules (Hl7Service.java:111-129):
Rejection Detection
Validation Rule: If
rechaCabecera is present and greater than 0, the eligibility check is considered rejected. The rejection code and description are available in rechaCabecera and rechaCabeDeno respectively.Result Status
The operation returns anHl7Result<ElegibilidadResponse> with the following possible statuses:
OK - Eligibility confirmed
rechaCabecerais null, 0, or negative- Patient is eligible for services
- Response data contains valid member information
rechaCabecera > 0- Response includes rejection code and description
- Contains functional error with rejection details
- Network error, invalid response, or parsing failure
- No response data available
- Contains technical error details
Handling Results
Environment Configuration
The eligibility endpoint URL is constructed using:EnvironmentConfig.java:49-55):
https://api.example.com/api/v3/hl7/elegibilidad
Related Operations
Registration Operations
Register services after confirming eligibility
Result Types
Handle HL7 errors and rejections