Overview
The registration operation records medical services, procedures, and supplies provided to patients. It supports both header-level validation and item-level detail validation, allowing for partial success scenarios.Operation Method
Hl7Service.java:39-50
Endpoint URL: Retrieved via EnvironmentConfig.getHl7RegistracionUrl()
Request Structure
RegistracionRequest
The request contains operation parameters, technical data, provider information, and HL7 extensions.Operation Data Fields
Operation mode. Single character field (max length: 1)
Credential number. Fixed length: 23 characters
Service type identifier (tinyint)
Registration datetime in format:
yyyy-MM-dd'T'HH:mm:ssService date in format:
yyyy-MM-dd (varchar 10)Manual processing indicator. Enum values:
MANUAL(“0”)CAPITADOR(“C”)COMSULTA(“L”)
Consultation mode indicator (same enum as manual)
Technical Data Fields
External ticket number for tracking
Terminal identifier (max length: 20)
Internal transaction number
Provider Fields
Provider CUIT tax identification (max length: 40)
Provider registration origin (max length: 10)
Previous Result Fields
Previous authorization number if applicable
Previous rejection code (smallint)
HL7 Extended Fields
ICD diagnostic code (max length: 6)
Custom parameter 1 (max length: 255)
Custom parameter 2 (max length: 255)
Custom parameter 3 (max length: 255)
Effector type code (max length: 4)
Effector identifier (max length: 11)
Prescriber type code (max length: 4)
Prescriber identifier (max length: 11)
Message identifier (max length: 20)
Acknowledgment acceptance code (max length: 2)
Acknowledgment application code (max length: 2)
Message type indicator (max length: 1)
PowerBuilder compatibility flag (bit)
Example Request
Response Structure
RegistracionResponse
The response has a two-level structure: a header (cabecera) and optional detail items (detalle).Header information containing overall transaction data and rejection status
Array of detail items with individual item rejection information. May be null if no detail validation is performed.
RegistracionCabecera
Header-level response data.Transaction Fields
Transaction identifier assigned by the system
Transaction registration timestamp
Authorization number if approved
Rejection Fields
Header rejection code. If greater than 0, the entire registration is rejected at the header level.
Human-readable description of the header rejection reason
Member Information
Patient’s full 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
Provider Information
ICD code description
Provider name
Branch office identifier
RegistracionDetalle
Item-level detail with individual rejection tracking.Transaction identifier for this detail item
Item rejection code. If greater than 0, this specific item is rejected.
Human-readable description of the item rejection reason
Example Response (Full Success)
Example Response (Header Rejected)
Example Response (Partial Success)
Validation Logic
The service performs two-level validation (Hl7Service.java:131-169):
1. Header Validation
Header Rejection: If
rechaCabecera > 0 in the cabecera, the entire registration is rejected. No items are processed.2. Detail Validation
Partial Success: If the header is accepted but one or more detail items have
recha > 0, the operation returns PARTIAL status with a list of Hl7ItemError objects. Each error has origin = DETALLE.Result Status
OK - Complete success- Header accepted:
rechaCabecerais 0, null, or negative - All detail items accepted or no detail validation performed
- Full registration processed
- Header accepted:
rechaCabecerais 0, null, or negative - One or more detail items rejected:
recha > 0 - Contains list of
Hl7ItemErrorwith originDETALLE - Some items registered, others rejected
- Header rejected:
rechaCabecera > 0 - No items processed
- Contains functional error with rejection details
- Network error, invalid response, or parsing failure
- No response data available
Handling Results
Complete Success
Partial Success
Header Rejection
Technical Error
Environment Configuration
The registration endpoint URL is constructed using:EnvironmentConfig.java:57-63):
https://api.example.com/api/v3/hl7/registracion
Related Operations
Eligibility Operations
Check eligibility before registration
Cancellation Operations
Cancel registered services
Result Types
Handle partial success and rejections