While a Technical Reception captures the shipment-level compliance checklist, a tank technical review is the per-unit decision that determines whether each individual cylinder is cleared for active inventory or quarantined for return. Every cylinder that arrived under a given document number must pass through this step before it can be dispatched to a patient or facility. Reviews are always performed in the context of the parentDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Janblack07/OxygenDispatch/llms.txt
Use this file to discover all available pages before exploring further.
TechnicalReception record, ensuring a clear audit trail linking each cylinder’s outcome back to the formal reception form.
Overview
Tank reviews are accessed at:TankUnit records whose associated batch shares the same document_number as the reception — not just tanks from a single batch, but every cylinder that arrived under that order. Alongside the paginated tank list (50 per page, ordered by serial number), the view exposes a live summary of the review state:
| Key | Description |
|---|---|
total | Total number of tank units under this document number |
pending | Units with technical_status = Pendiente |
approved | Units with technical_status = Aprobado |
rejected | Units with technical_status = Rechazado |
reviewed | approved + rejected (units that have received a decision) |
progress | round((reviewed / total) × 100) — percentage complete |
Review actions
All review operations post to:action field controls which operation is performed.
- Approve selected
- Reject selected
- Approve all pending
Mark one or more specific cylinders as approved.What happens on approval:For each selected tank unit, inside a single
Must be
approve.Array of UUIDs identifying the tank units to approve. At least one ID is required. Every ID must exist in the
tank_units table and must belong to a batch whose document_number matches the reception.DB::transaction:technical_status_idis updated to the Aprobado catalog entry.warehouse_area_idis updated to the Productos aprobados area.- A
TankTechnicalReviewrecord is created withresult = approved. - An
InventoryMovementof typeCAMBIO_ESTADO_TECNICOis recorded, capturing the previous area, the new area, the document number asreference_document, and a human-readable note:"Revisión técnica aprobada. Estado técnico: {previous} → Aprobado.".
"2 tanque(s) aprobado(s) y trasladado(s) al área de Productos aprobados.".TankTechnicalReview record
Every approval or rejection creates exactly oneTankTechnicalReview row. The table schema is:
| Field | Type | Notes |
|---|---|---|
tank_unit_id | UUID | Foreign key → tank_units.id, cascades on delete |
technical_reception_id | bigint | Foreign key → technical_receptions.id, set null on delete |
result | string(20) | approved or rejected |
anomaly_type | string(120) | Populated only on rejections |
observation | text | Optional extended notes; populated only on rejections |
reviewed_by_user_email | string(150) | Email of the authenticated user who performed the review |
reviewed_at | datetime | Timestamp of the review decision |
TankUnit can have multiple TankTechnicalReview records over its lifetime (e.g. rejected, returned to supplier, received again under a new document number), but within a single reception each unit is reviewed exactly once.
Filtering the review list
Partial match on the cylinder’s
serial field. Performs a LIKE "%{serial}%" search.Filter by current technical status name. Accepted values:
Pendiente, Aprobado, Rechazado. The filter resolves through the technicalStatus relationship, so it always reflects the current catalog values.withQueryString().
All approve and reject operations — including bulk approval — are wrapped in
DB::transaction(). Tank rows are fetched with lockForUpdate() before any mutation is applied, preventing concurrent requests from reviewing the same cylinder simultaneously. If two users attempt to review the same tank at the same moment, the second request will either block until the first commits or fail with a database-level lock error, ensuring data integrity is never compromised.