Skip to main content

Documentation 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.

A technical reception (ficha técnica de recepción) is the formal quality-control record that must accompany every incoming shipment of medical gas cylinders. Peruvian medical-device regulations require that each batch delivery be inspected and documented before cylinders can be placed into active inventory. In OxygenDispatch, one technical reception covers every batch that shares the same document_number — the delivery note or purchase-order number printed on the supplier’s paperwork — giving quality teams a single, auditable checklist per shipment regardless of how many individual batches or cylinders arrived under that order.

Overview

The TechnicalReception model is uniquely keyed on document_number. Because all batches in a single shipment share the same document number, one reception form represents the complete compliance record for the entire delivery. Creating a new form navigates to it via the document_number query parameter; if a reception already exists for that document number the application redirects straight to the edit view so that no duplicate records can be created. The reception aggregates header metadata (supplier, dates, responsible personnel), the auto-calculated documentation_complies flag, the overall final_result, and a full set of TechnicalReceptionItem checklist rows.

Reception header fields

document_number
string
required
The delivery note or purchase-order number. Must already exist in the batches table and must be unique across technical_receptions. All batches and tank units sharing this number fall under the same reception.
reception_date
date
The date and time the shipment was physically received at the warehouse. Nullable; pre-populated from the earliest received_at date found in the matching batches.
invoice_number
string
Supplier invoice reference. Max 100 characters.
remission_guide_number
string
Remission guide (guía de remisión) number accompanying the shipment. Max 100 characters.
supplier_name
string
Name of the supplying company. Max 200 characters.
manufacturer_name
string
Name of the cylinder or gas manufacturer. Max 200 characters.
delivered_by
string
Full name of the person who delivered the shipment on behalf of the supplier. Max 200 characters.
received_by
string
Full name of the warehouse staff member who accepted delivery. Max 200 characters. Pre-populated with the authenticated user’s name.
storage_conditions
string
Free-text description of the storage conditions under which the shipment arrived or must be held.
quantity_received
integer
Total number of individual cylinder units received. Must be ≥ 0. Pre-populated from the count of TankUnit records linked to the matching batches; can be adjusted manually before saving.
documentation_complies
boolean
Read-only / auto-calculated. Set to true only when every item in the Revisión documental section has been explicitly marked and all are compliant. Set to null if any documental item has not yet been answered. See documentation_complies auto-calculation below.
final_result
string
required
Overall outcome of the reception. Must be one of:
ValueMeaning
pendienteReview is still in progress (default)
aprobadoShipment passed all checks
rechazadoShipment was rejected
responsible_name
string
Full name of the quality professional responsible for signing off the form. Max 200 characters. Defaults to the configured Responsable Técnico.
responsible_position
string
Job title or role of the responsible person (e.g. Responsable Técnico). Max 200 characters.
responsible_observation
string
Free-text observations or notes from the responsible person.

Checklist sections

Every reception ships with a pre-built, 30-item checklist (defaultChecklist()) divided into three sections. Items are stored as TechnicalReceptionItem rows, each carrying a section label, a human-readable label, a nullable complies boolean, a free-text observation, and an integer sort_order that preserves the canonical display sequence.

1 — Revisión documental (12 items)

Documentary review confirms that all paperwork accompanying the shipment is present and correct.
#Label
1Nombre del producto
2Nombre del gas y fórmula química
3Concentración del principio activo, cuando aplique
4Presentación del producto y advertencias del uso
5Nombre del fabricante y/o proveedor
6Condiciones de almacenamiento
7Cantidad de productos recibidos
8Vía de administración, cuando aplique
9Lote / serie
10Fecha de elaboración
11Fecha de expiración
12Nombre y firma de la persona que entrega y de la que recibe

2 — Certificado de análisis según el tipo de producto (2 items)

Verifies that the relevant quality certificates were supplied by the manufacturer.
#Label
13Certificado de análisis de control de calidad (COA)
14Certificado de esterilidad, cuando aplique, emitido por el fabricante

3 — Especificaciones técnicas según muestreo (16 items)

Physical and label inspection carried out on a representative sample of cylinders from the shipment.
#Label
15La etiqueta de identificación corresponde con la del producto que contiene: nombre del gas y fórmula química
16Nombre del producto / nombre genérico
17Lote
18Fecha de elaboración
19Fecha de expiración
20Presentación del producto, forma farmacéutica y advertencias de uso
21Intacto, sin rasgaduras o algún signo que evidencie deterioro del producto
22Nombre del fabricante y/o importador cuando corresponda
23Condiciones de almacenamiento
24Que no exista presencia de quemaduras de arco, golpes
25Que no presente grietas, roturas ni perforaciones
26Que se encuentre bien sellado
27Que no se encuentren deformados
28Que no se encuentren sucios con grasas o aceites
29Que indique la concentración del principio activo
30Las etiquetas de identificación de los envases están bien adheridas y cumplen con las disposiciones de los reglamentos de registro sanitario según corresponda a cada producto
Each item’s complies field accepts three states: true (complies), false (does not comply), or null (not yet answered). An observation text field is available on every item for inline notes.

documentation_complies auto-calculation

The documentation_complies header field is derived entirely from the state of the 12 Revisión documental items at save time — it is never set manually.
if ALL 12 "Revisión documental" items are marked (complies ≠ null):
    documentation_complies = (all 12 items have complies = true)
else:
    documentation_complies = null          ← still in progress
The calculation runs inside validateReception() on every store and update call:
$documentalItems = $items->filter(
    fn($item) => ($item['section'] ?? '') === 'Revisión documental'
);

$allDocumentalMarked = $documentalItems->every(
    fn($item) => array_key_exists('complies', $item) && $item['complies'] !== ''
);

$allDocumentalComplies = $documentalItems->every(
    fn($item) => (string) ($item['complies'] ?? '') === '1'
);

$data['documentation_complies'] = $allDocumentalMarked
    ? $allDocumentalComplies
    : null;
This means documentation_complies can only ever be true when every single documentary item is both answered and passing. A single unanswered item drives the field back to null; a single failing item drives it to false.

PDF export

A print-ready version of the form can be streamed at any time:
GET /technical-receptions/{technicalReception}/pdf
The response streams an A4 portrait PDF rendered via DomPDF. The filename is derived from the document_number with slashes, backslashes, and spaces replaced by hyphens:
ficha-tecnica-{safe-document-number}.pdf
No authentication scope change is required — the route follows the same middleware as the rest of the reception resource.

Signed PDF upload

After a physical copy of the form has been signed by the Responsable Técnico, the scanned PDF can be attached to the record:
POST /technical-receptions/{technicalReception}/signed-pdf
Content-Type: multipart/form-data
signed_pdf
file
required
The signed reception form as a PDF. Allowed MIME type: application/pdf. Maximum size: 10 MB (10 240 KB).
On success the file is stored at:
storage/app/public/technical-receptions/signed/
ficha-tecnica-firmada-{safe-document-number}-{YmdHis}.pdf
If a signed PDF was previously uploaded for this reception, the old file is deleted from disk before the new one is written. The following fields are updated on the TechnicalReception record:
FieldValue
signed_pdf_pathStorage-relative path of the saved file
signed_pdf_uploaded_atCurrent timestamp
signed_pdf_uploaded_byEmail address of the authenticated user

Filtering the reception list

GET /technical-receptions
The index groups batches by document_number and left-joins technical_receptions, so every unique document number appears whether or not a form has been created yet.
q
string
Free-text search. Performs a LIKE match against batches.document_number, batches.supplier_name, batches.voucher_number, and batches.batch_number.
final_result
string
Filter by reception outcome. Accepted values:
ValueEffect
pendienteOnly receptions still under review
aprobadoOnly approved receptions
rechazadoOnly rejected receptions
sin_fichaDocument numbers that have no reception form yet
Results are paginated at 15 rows per page and ordered by the earliest received_at date within each document group, descending.
Navigating to GET /technical-receptions/create?document_number={value} will redirect to the edit view if a reception already exists for that document number, returning a success flash message: “Esta orden ya tiene ficha técnica. Puedes continuar editando el checklist.” If the document number is blank or not found in the batches table, the user is redirected back to the index with an error.

Build docs developers (and LLMs) love