sysvale/ras
Laravel package by Sysvale for handling RAS (Registro de Atendimento em Saúde) data, providing PHP models, validation, and integration helpers for healthcare attendance records.
This package is a Laravel integration for LEDI (Modelo de Informação para Registro Eletrônico em Saúde), the Brazilian health-interoperability standard. Version 1.6.0 bumps the underlying conformance target to LEDI 8.4.0, so anything you produce or validate is now expected to match the 8.4.0 specification rather than the previous revision.
Minimal path to first output:
composer require the package, then check composer.json for the service provider / facade alias — the provider is usually auto-discovered, but confirm the namespace before writing imports.php artisan vendor:publish --provider=...) and read it top to bottom. Schema-version constants almost always live there; verify it now reads 8.4.0.php artisan list | grep -i ledi). A validation or generation command is the fastest smoke test that the upgrade landed correctly.Start with the package's own test fixtures for 8.4.0 — they encode the field-level expectations faster than the spec PDF does.
Model-to-document mapping. Keep a thin mapping layer between your Eloquent models and the LEDI structure rather than letting the package read models directly. When the standard revises (as it just did), you change one mapper instead of hunting field names across the app.
Validate at the boundary, not only on export. Run the package's validator when data is saved and again before export. The 8.4.0 schema is the authority; catching an invalid CNS/CPF or a newly-required field at save time beats discovering it in a batch export at 2am.
Version-stamp every artifact. Persist the LEDI version alongside each generated document (ledi_version column or a sidecar file). Once 8.4.0 output starts mixing with historical 8.3.x files, you need to know which is which for audit and for re-submission to SIS/ANS.
Queue the heavy work. Generation and validation of large record sets belong in a job. Pattern: GenerateLediDocument job → writes to a Storage disk → fires an event → notification with a signed download URL.
Config-driven version pinning. If the config exposes the target schema version, bind it to an env var so staging can stay on the old revision while production cuts over, instead of forking the package.
Fixture-based regression suite. Commit a small corpus of known-good 8.4.0 XML. Assert your generated output is schema-valid and that the fields you care about survive. This is the single highest-leverage thing you can add during a schema bump.
php artisan config:clear (and re-cache). A stale cached config can keep the old schema constant alive and produce a confusing half-upgraded state.charset in the generated XML header and that config('app.locale') changes haven't altered number formatting in your mappers."vendor/package": "~1.6.0" — a caret range on a package that tracks an external standard can silently move you to a schema revision your downstream consumer does not accept.How can I help you explore Laravel packages today?