
   PASS  Tests\Feature\AdminPageSmokeTest
  ✓ parameterless get pages render without server errors                                                        37.75s  
  ✓ record pages render without server errors                                                                   14.39s  
  ✓ the administrator can reach the beds admissions and invoice capabilities                                     1.07s  

   PASS  Tests\Feature\AllergyMedicationTest
  ✓ missing status is unknown not none                                                                           0.67s  
  ✓ allergies page renders unknown banner for unassessed patient                                                 1.84s  
  ✓ assessed none is distinct from unknown                                                                       0.77s  
  ✓ recording an allergy sets status to recorded                                                                 0.66s  
  ✓ blank allergen is rejected                                                                                   0.67s  
  ✓ unknown severity is preserved not defaulted                                                                  0.76s  
  ✓ assessed none refused while active allergies exist                                                           0.67s  
  ✓ entered in error keeps the row and recalculates status                                                       0.69s  
  ✓ entered in error requires a reason                                                                           0.72s  
  ✓ reset to unknown requires a reason                                                                           0.67s  
  ✓ reset to unknown withdraws an assessment                                                                     0.71s  
  ✓ nurse can record allergies                                                                                   0.71s  
  ✓ receptionist cannot record allergies                                                                         0.65s  
  ✓ recording a medication with source and provenance                                                            0.69s  
  ✓ blank medication name is rejected                                                                            0.66s  
  ✓ discontinuing keeps the row with a reason                                                                    0.70s  
  ✓ discontinue requires a reason                                                                                0.80s  
  ✓ only active medications can be discontinued                                                                  0.68s  
  ✓ reconciliation records actor and time                                                                        0.71s  
  ✓ allergies page renders for doctor                                                                            1.01s  
  ✓ receptionist cannot open the allergies page                                                                  0.85s  
  ✓ tenant isolation second tenant patient is not reachable                                                      0.63s  
  ✓ audit actions are recorded                                                                                   0.67s  
  ✓ medication page shows discontinued items retained                                                            0.81s  

   PASS  Tests\Feature\AppointmentBookingTest
  ✓ booking succeeds inside a published window                                                                   0.70s  
  ✓ clinician double booking is rejected                                                                         0.67s  
  ✓ room double booking is rejected                                                                              0.62s  
  ✓ booking outside published window is rejected                                                                 0.58s  
  ✓ booking during a whole day override is rejected                                                              0.61s  
  ✓ reschedule revalidates conflicts against the new slot                                                        0.59s  
  ✓ reschedule moves the appointment when the new slot is free                                                   0.59s  
  ✓ cancellation requires a reason and frees the slot                                                            0.61s  
  ✓ status transitions are recorded and audited                                                                  0.62s  
  ✓ no show marks the appointment                                                                                0.63s  
  ✓ booking without manage permission is rejected                                                                0.65s  
  ✓ portal resolves only the signed in patients own record                                                       1.62s  
  ✓ portal requires the book own permission                                                                      0.71s  
  ✓ the portal offers only clinical roles as bookable clinicians                                                 0.69s  
  ✓ appointments index requires view permission                                                                  0.70s  
  ✓ booking form requires manage permission                                                                      0.77s  
  ✓ http booking surfaces conflicts as validation errors                                                         0.62s  
  ✓ tenant isolation on appointments                                                                             0.73s  
  ✓ the booking service refuses a patient from another tenant                                                    0.59s  
  ✓ availability service blocks unavailable clinicians                                                           0.60s  

   PASS  Tests\Feature\AskBitmedAiTest
  ✓ demo mode is labelled and is not presented as model output                                                   0.76s  
  ✓ asking a question stores the turn                                                                            0.63s  
  ✓ a demo answer is clearly labelled as an example                                                              0.61s  
  ✓ an unavailable provider produces no fabricated answer                                                        0.62s  
  ✓ urgent symptom prompt triggers escalation without false reassurance                                          0.61s  
  ✓ a question without a subject asks for clarification                                                          0.60s  
  ✓ the interface explains that no records are accessible                                                        0.75s  
  ✓ the provider interface offers no way to reach a record                                                       0.60s  
  ✓ the question service accepts no patient context at all                                                       0.61s  
  ✓ possible identifiers in a question are flagged                                                               0.59s  
  ✓ history is private to one user and never shared                                                              0.63s  
  ✓ history of another tenant is not visible                                                                     0.61s  
  ✓ validation rejects an empty question                                                                         0.61s  
  ✓ a patient can ask general questions                                                                          0.70s  
  ✓ jargon adjustment is available without patient context                                                       0.58s  

   PASS  Tests\Feature\AttendanceTest
  ✓ self check in creates todays row and never infers late                                                       0.96s  
  ✓ a second check in is refused                                                                                 0.94s  
  ✓ check out closes the row and hours derive from the times                                                     1.01s  
  ✓ checking out without checking in is refused                                                                  0.97s  
  ✓ hr marks someone elses day and the act is audited                                                            0.91s  
  ✓ correcting an existing row requires a reason and keeps attribution                                           0.95s  
  ✓ a check out cannot precede its check in                                                                      0.94s  
  ✓ the nurse sees only herself and cannot mark anyone                                                           1.38s  
  ✓ hr reads the whole register for a chosen day                                                                 1.12s  
  ✓ the seeded correction is visible on the register                                                             1.13s  
  ✓ patient accounts have no attendance door at all                                                              1.18s  
  ✓ another clinics people cannot be marked from here                                                            0.97s  
  ✓ the pharmacy edition has no attendance pages                                                                 1.05s  
  ✓ marking never touches pay                                                                                    0.93s  

   PASS  Tests\Feature\AuditTest
  ✓ seeding writes audit entries                                                                                 0.58s  
  ✓ audit entries are append only                                                                                0.58s  
  ✓ audit entries cannot be deleted                                                                              0.62s  
  ✓ reading the audit trail is itself audited                                                                    0.76s  
  ✓ metadata never records secrets or clinical values                                                            0.60s  
  ✓ audit entry keeps attribution even if the account is removed                                                 0.61s  
  ✓ a tenant cannot read another tenants audit trail                                                             0.75s  

   PASS  Tests\Feature\AuthorizationTest
  ✓ doctor holds clinical permissions                                                                            0.60s  
  ✓ administration rights do not grant clinical access                                                           0.61s  
  ✓ patient holds only self service permissions                                                                  0.57s  
  ✓ unknown permission key is denied                                                                             0.58s  
  ✓ patient scoped permission requires an assigned care relationship                                             0.59s  
  ✓ facility scoped grant does not travel to another facility                                                    0.64s  
  ✓ expired grant loses access                                                                                   0.63s  
  ✓ revoked grant loses access immediately                                                                       0.59s  
  ✓ disabled account holds no permission                                                                         0.60s  
  ✓ emergency access requires the explicit capability and a reason                                               0.59s  
  ✓ authorization denials are audited                                                                            0.59s  
  ✓ route permission denial returns forbidden without revealing records                                          0.77s  
  ✓ patient cannot reach staff workspaces                                                                        0.88s  
  ✓ platform account requires a platform role for platform powers                                                0.61s  
  ✓ tenant account never gains platform powers                                                                   0.58s  

   PASS  Tests\Feature\BedAndAdmissionIsolationTest
  ✓ a bed can be assigned and becomes occupied                                                                   0.96s  
  ✓ a bed already taken cannot be assigned again                                                                 0.98s  
  ✓ a patient can be transferred between beds                                                                    0.97s  
  ✓ a transfer to a bed already taken is refused                                                                 0.96s  
  ✓ a bed can be released and the stay retained                                                                  1.05s  
  ✓ an admission can be raised and then discharged                                                               0.96s  
  ✓ an admission cannot be discharged twice                                                                      0.93s  
  ✓ discharge requires a summary                                                                                 0.94s  
  ✓ the discharge form renders and submits                                                                       1.27s  
  ✓ the bed runner cannot admit or discharge                                                                     1.08s  
  ✓ the admitting doctor cannot move a patient between beds                                                      1.08s  
  ✓ a patient cannot open the bed register or place themselves                                                   1.20s  
  ✓ another clinics bed is not readable                                                                          0.96s  
  ✓ a patient cannot be placed in another clinics bed                                                            1.03s  
  ✓ a bed cannot be transferred into another clinic                                                              1.01s  
  ✓ another clinics bed stay cannot be released                                                                  0.96s  
  ✓ another clinics admission is not readable                                                                    0.95s  
  ✓ another clinic cannot discharge your admission                                                               0.96s  
  ✓ an admission cannot be raised against another clinic                                                         1.04s  

   PASS  Tests\Feature\CalendarFoundationTest
  ✓ seeded availability windows exist for the pilot                                                              0.58s  
  ✓ calendar is permission guarded                                                                               0.65s  
  ✓ calendar renders for a doctor                                                                                1.14s  
  ✓ calendar uses text labels not colour alone                                                                   0.79s  
  ✓ a whole day override blocks the whole day                                                                    0.98s  
  ✓ a part day override blocks only the covered slots                                                            0.76s  
  ✓ a different tenant cannot view another tenants calendar                                                      1.00s  
  ✓ time off is recorded against one staff member                                                                0.68s  

   PASS  Tests\Feature\CareRecordingTest
  ✓ recording a care action attributes it to the authenticated user                                              1.09s  
  ✓ a care action cannot be attributed to someone else via the form                                              1.00s  
  ✓ a care action cannot be recorded against another clinics patient                                             0.96s  
  ✓ a care action cannot reference another clinics order                                                         0.91s  
  ✓ a care action requires an amendment reason to be amended                                                     0.92s  
  ✓ amending a care action never reassigns its performer or patient                                              0.97s  
  ✓ a staff member cannot be assigned to the same patient twice                                                  0.97s  
  ✓ ending a care team assignment retains the row for the history                                                0.94s  
  ✓ a care team assignment cannot be ended twice                                                                 0.92s  
  ✓ a care team assignment cannot name another clinics staff member                                              0.92s  
  ✓ a treatment entry stores a diagnosis code verbatim                                                           0.94s  
  ✓ amending a treatment entry never reassigns who treated the patient                                           0.90s  
  ✓ a treatment entry cannot be recorded for another clinics patient                                             0.93s  
  ✓ a cashier is refused because clinical access is not theirs                                                   1.43s  
  ✓ the clinic screens render with their seeded data                                                             1.10s  
  ✓ one clinic cannot read another clinics care record                                                           0.91s  

   PASS  Tests\Feature\ClinicalDecisionSupportTest
  ✓ only approved active rules fire                                                                              0.62s  
  ✓ recorded allergy rule fires for the patient with allergies                                                   0.56s  
  ✓ unknown allergy status is reported as unknown never none                                                     0.56s  
  ✓ assessed none allergy status triggers neither allergy rule                                                   0.57s  
  ✓ approval makes a reviewed rule fire                                                                          0.57s  
  ✓ duplicate order rule reports a missing input when no line is selected                                        0.57s  
  ✓ approval requires a note and only from review                                                                0.58s  
  ✓ a draft rule cannot be approved                                                                              0.56s  
  ✓ unvalidated rule content cannot be created                                                                   0.56s  
  ✓ approved rule is immutable and retirement stops it firing                                                    0.56s  
  ✓ retired rule no longer fires                                                                                 0.58s  
  ✓ rule outside its effective window does not fire                                                              0.57s  
  ✓ override requires a reason and records the rule snapshot                                                     0.59s  
  ✓ override and acknowledgement are recorded                                                                    0.60s  
  ✓ retirement does not rewrite recorded guidance events                                                         0.60s  
  ✓ alert burden metrics report firings and override rate                                                        0.59s  
  ✓ guidance verbs are patient scoped                                                                            0.61s  
  ✓ rule governance requires the governance verb                                                                 0.42s  
  ✓ rule register is hidden from other tenants                                                                   0.55s  
  ✓ record panel shows guidance for a clinician                                                                  1.58s  
  ✓ cds register is open to clinicians and closed to reception                                                   1.24s  
  ✓ order placement records guidance surfacing without blocking                                                  0.65s  

   PASS  Tests\Feature\ClinicalOrderTest
  ✓ seeded catalogue is orderable and a retired line is not                                                      0.57s  
  ✓ order copies catalog code name and version at placement                                                      0.58s  
  ✓ retiring a catalog line never rewrites an existing order                                                     0.57s  
  ✓ ordering a retired or unknown line is refused                                                                0.57s  
  ✓ catalog line requiring an indication enforces it                                                             0.58s  
  ✓ order records its author and timestamp                                                                       0.57s  
  ✓ receptionist cannot place an order                                                                           0.56s  
  ✓ nurse without clinical order cannot place an order                                                           0.56s  
  ✓ amending an order supersedes it and keeps the original                                                       0.57s  
  ✓ amending requires a reason                                                                                   0.56s  
  ✓ a terminal order cannot be amended                                                                           0.57s  
  ✓ fulfilling an order records actor and time                                                                   0.60s  
  ✓ duplicate fulfillment is refused                                                                             0.62s  
  ✓ a cancelled order can never be fulfilled                                                                     0.66s  
  ✓ cancelling requires a reason and retains the row                                                             0.69s  
  ✓ entered in error keeps the row for attribution                                                               0.65s  
  ✓ an order can be started once                                                                                 0.62s  
  ✓ a retried request with the same key returns the original order                                               0.62s  
  ✓ reusing a key with a different request is refused                                                            0.62s  
  ✓ orders page renders for a doctor                                                                             1.35s  
  ✓ receptionist cannot open the orders page                                                                     0.77s  
  ✓ tenant isolation second tenant patient is not reachable                                                      0.63s  
  ✓ audit actions are recorded                                                                                   0.67s  
  ✓ cancelled orders remain visible on the page                                                                  0.72s  

   PASS  Tests\Feature\ClinicalRecordTest
  ✓ doctor can open a standalone encounter                                                                       0.64s  
  ✓ second open encounter for same patient is rejected                                                           0.63s  
  ✓ waiting queue entry cannot start an encounter                                                                0.60s  
  ✓ with clinician queue entry starts an encounter                                                               0.63s  
  ✓ nurse can open encounter but cannot sign                                                                     0.68s  
  ✓ draft can be saved and sections persist                                                                      0.60s  
  ✓ blank sections stay null not empty string                                                                    0.60s  
  ✓ empty note cannot be saved                                                                                   0.61s  
  ✓ draft author can edit their own draft                                                                        0.62s  
  ✓ signing a note makes it immutable                                                                            0.61s  
  ✓ doctor signs note with full attribution                                                                      0.61s  
  ✓ amendment preserves original and attributes both                                                             0.63s  
  ✓ amendment requires a reason                                                                                  0.68s  
  ✓ only signed note can be amended                                                                              0.64s  
  ✓ all four entry kinds can be recorded                                                                         0.67s  
  ✓ entries are locked after encounter closes                                                                    0.63s  
  ✓ entries are only editable by the recording clinician                                                         0.64s  
  ✓ closed encounter cannot be reopened or double closed                                                         0.61s  
  ✓ close encounter completes a linked checked in appointment                                                    0.65s  
  ✓ longitudinal record page renders for doctor                                                                  0.79s  
  ✓ receptionist cannot access the clinical workspace                                                            0.74s  
  ✓ imported notes display source label                                                                          0.81s  
  ✓ cannot save draft on a closed encounter                                                                      0.62s  
  ✓ tenant isolation a second tenant patient is not reachable                                                    0.60s  
  ✓ audit actions are recorded                                                                                   0.59s  

   PASS  Tests\Feature\ClinicalResultTest
  ✓ delivery records severity as delivered with the ordering clinician as owner                                  0.63s  
  ✓ unknown severity is refused and source is required                                                           0.63s  
  ✓ a retried delivery for the same order is refused                                                             0.63s  
  ✓ delivery is refused for an order that is not open                                                            0.61s  
  ✓ rejected delivery is retained escalated and keeps the order open                                             1.16s  
  ✓ rejected delivery requires a reason                                                                          0.62s  
  ✓ doctor may review but may not deliver a result                                                               0.62s  
  ✓ laboratory may deliver but may not review                                                                    0.61s  
  ✓ receptionist cannot review results                                                                           0.62s  
  ✓ acknowledge records the reviewer and blocks double acknowledgment                                            0.63s  
  ✓ action requires a note and follow up requires a due date                                                     0.62s  
  ✓ critical and abnormal cannot close without an actioned result                                                0.64s  
  ✓ normal result can close as reviewed                                                                          0.62s  
  ✓ only the owner or a reviewer may be assigned a result                                                        0.63s  
  ✓ owner can be reassigned before review                                                                        0.60s  
  ✓ overdue review escalates once and the escalation survives acknowledgment                                     0.62s  
  ✓ follow up outlives the closed encounter                                                                      0.61s  
  ✓ seeded results cover each review state                                                                       0.67s  
  ✓ worklist is open to reviewers and closed to reception                                                        1.59s  
  ✓ patient results page requires clinical access and scopes to the patient                                      1.14s  
  ✓ results of one tenant are invisible to another                                                               0.60s  
  ✓ delivery queue is open to the performing service                                                             0.82s  
  ✓ http delivery by the performing service lands awaiting review                                                0.64s  
  ✓ http delivery by unauthorised roles creates nothing                                                          0.67s  
  ✓ review lifecycle is audited                                                                                  0.60s  

   PASS  Tests\Feature\CredentialAndPrivilegesTest
  ✓ the credential register lists the seeded rows with derived currency                                          1.15s  
  ✓ the credential register filters by derived state                                                             1.44s  
  ✓ credential doors are closed to accounts that do not hold them                                                2.05s  
  ✓ the hr officer reads and records credentials                                                                 1.18s  
  ✓ a credential round trips through record and amend forms                                                      1.50s  
  ✓ the expiry cannot precede the issue date                                                                     0.97s  
  ✓ a credential number is unique per clinic                                                                     1.00s  
  ✓ recording a credential requires its fields                                                                   0.98s  
  ✓ another clinics credential does not resolve holding every door                                               0.95s  
  ✓ an edition without the staff module cannot open the credential register                                      0.98s  
  ✓ a status decision states its reason                                                                          0.98s  
  ✓ status decisions are audited and refuse a repeat                                                             1.04s  
  ✓ a suspended licence closes the practice doors and restores them                                              1.89s  
  ✓ an expired licence removes practice while the status stays active                                            1.05s  
  ✓ a certificate never gates practice even when stopped                                                         1.13s  
  ✓ a person with no credentials is not restricted                                                               1.13s  
  ✓ only licence typed credentials gate                                                                          0.95s  
  ✓ the profile reports practice standing from the holds                                                         2.17s  
  ✓ the privileges panel reads the live set and is not a side door into grants                                   1.45s  

   PASS  Tests\Feature\DashboardMetricsTest
  ✓ weekly slot total reconciles to the availability rows                                                        0.69s  
  ✓ weekday chart counts reconcile to the same rows                                                              0.66s  
  ✓ chart labels and values are structured for the data table                                                    0.67s  
  ✓ time off count reconciles to the override rows                                                               0.69s  
  ✓ active account count reconciles to the user rows                                                             0.66s  
  ✓ undelivered modules are listed rather than counted as features                                               0.67s  
  ✓ dashboard of a pharmacy admin shows only that organisations records                                          0.68s  
  ✓ audit chart is hidden without audit permission                                                               1.02s  
  ✓ manager dashboard renders every chart with a data table                                                      0.85s  

   PASS  Tests\Feature\DashboardPermissionGatingTest
  ✓ the patient sees no revenue figure anywhere on the dashboard                                                 1.12s  
  ✓ the revenue rows exist but are not computed for an unauthorised role                                         1.00s  
  ✓ the finance roles and the tenant administrator keep the revenue chart                                        1.40s  
  ✓ a clinician sees scheduling capacity but no clinic money                                                     1.25s  
  ✓ named staff leave is withheld from a role without leave view                                                 1.49s  
  ✓ roster capacity and foundation counts refuse a patient in words                                              1.12s  
  ✓ a refusal never masquerades as an empty clinic                                                               1.08s  
  ✓ every seeded role still renders the dashboard                                                                5.25s  

   PASS  Tests\Feature\DemoEnvironmentGuardTest
  ✓ local testing environment is permitted                                                                       0.02s  
  ✓ the guard refuses a shared database connection                                                               0.01s  
  ✓ the guard refuses a production environment                                                                   0.01s  
  ✓ the guard refuses a production url                                                                           0.01s  
  ✓ the guard throws when used assertively                                                                       0.02s  
  ✓ seed command is registered                                                                                   1.34s  
  ✓ sync modules command is registered                                                                           0.04s  

   PASS  Tests\Feature\DemoSeedingRendersTest
  ✓ the patient profile tabs render the seeded care record                                                       2.72s  
  ✓ the drug administration list shows both a given and an outstanding dose                                      1.28s  
  ✓ the ward register shows a matron and a location                                                              1.10s  
  ✓ the product catalogue is populated for the invoice picker                                                    1.27s  
  ✓ the invoice form offers the catalogue items for selection                                                    1.10s  
  ✓ the demo seeder can be run twice without error                                                               1.03s  

   PASS  Tests\Feature\DepositsAndCashierClosingTest
  ✓ taking a deposit holds money in the register and against the patient                                         0.96s  
  ✓ an identifier that matches no local patient takes no money                                                   0.94s  
  ✓ another clinic s patient cannot be held money against                                                        0.92s  
  ✓ taking a deposit is the collect permission not the view one                                                  1.06s  
  ✓ applying a deposit pays the invoice and records who applied it                                               0.99s  
  ✓ applying more than the deposit holds is refused and nothing moves                                            0.99s  
  ✓ an invoice that will not take the money takes no allocation                                                  0.96s  
  ✓ a deposit cannot be drained by a second application                                                          1.00s  
  ✓ the drawer is opened tagged and closed by its own cashier                                                    1.03s  
  ✓ the closing figure is a snapshot the register cannot later change                                            0.99s  
  ✓ one open shift per cashier and a closed shift never reopens                                                  0.96s  
  ✓ a held deposit goes back only through a second person                                                        0.96s  
  ✓ money already applied to an invoice cannot be refunded off the deposit                                       1.02s  
  ✓ the deposit and shift pages are closed to clinical accounts                                                  1.37s  
  ✓ a cashier can see the payer register but cannot write to it                                                  1.11s  
  ✓ another clinic s deposit is not reachable over http                                                          0.98s  
  ✓ the deposits page renders a held deposit with its apply form                                                 1.09s  
  ✓ the take deposit form offers registered payers with their type                                               1.10s  
  ✓ the shifts page renders the close form and the open form                                                     1.59s  
  ✓ the refunds page renders a deposit refund that has no invoice                                                1.09s  

   PASS  Tests\Feature\DrugAdministrationWorkflowTest
  ✓ a scheduled dose is recorded as administered                                                                 0.98s  
  ✓ a dose cannot be attributed to another clinician via the form                                                0.96s  
  ✓ a dose already given cannot be given twice                                                                   0.97s  
  ✓ a dose already given cannot be relabelled as missed                                                          0.96s  
  ✓ a dose already given cannot be relabelled as withheld                                                        0.99s  
  ✓ a dose already given cannot be cancelled                                                                     0.98s  
  ✓ a dose already given cannot have its details rewritten                                                       0.97s  
  ✓ a withheld dose records a reason                                                                             0.95s  
  ✓ an outstanding dose can be marked missed                                                                     0.98s  
  ✓ cancelling a dose retains the row for audit                                                                  0.94s  
  ✓ a patient cannot record any drug action                                                                      1.23s  
  ✓ another clinic drug action is not reachable at all                                                           0.93s  

   PASS  Tests\Feature\EmployeeAndLeaveTest
  ✓ the register lists the seeded staff and derives the on leave mark                                            1.15s  
  ✓ the register filters by lifecycle state                                                                      1.14s  
  ✓ personnel doors are closed to clinical and front desk accounts                                               2.28s  
  ✓ the hr officer reads and curates the register                                                                1.21s  
  ✓ a new employee round trips through the register forms                                                        2.18s  
  ✓ an employee number is unique per clinic                                                                      0.95s  
  ✓ termination names its day and un termination clears it                                                       0.99s  
  ✓ another clinics employee is not reachable holding every door                                                 0.95s  
  ✓ an edition without the staff module cannot open the register                                                 1.00s  
  ✓ the seeded register links staff to their signing in accounts                                                 0.96s  
  ✓ the leave page lists the seeded ledger only for the holding doors                                            1.31s  
  ✓ a request is recorded with its recorder and inclusive days                                                   0.92s  
  ✓ identical leave is not recorded twice                                                                        0.93s  
  ✓ a range ending before it starts is refused                                                                   0.94s  
  ✓ the recorder cannot decide their own request                                                                 0.99s  
  ✓ a second person approves and the decision is attributed                                                      0.97s  
  ✓ approval refuses days already approved                                                                       0.99s  
  ✓ a refusal keeps its stated reason and needs one                                                              0.98s  
  ✓ a decided row is never re decided                                                                            1.00s  
  ✓ a recorder withdraws their own request but not a decided one                                                 0.97s  
  ✓ cancelling someone elses request needs the decision door                                                     1.01s  
  ✓ terminated employees are not offered new leave                                                               0.94s  
  ✓ every transition is audited                                                                                  0.95s  
  ✓ employee changes are audited with attribution                                                                1.04s  

   PASS  Tests\Feature\ExampleTest
  ✓ the root redirects to the dashboard                                                                          0.03s  
  ✓ guests are sent to sign in when they reach the dashboard                                                     0.02s  
  ✓ the sign in screen renders for guests                                                                        0.03s  

   PASS  Tests\Feature\GrantManagementTest
  ✓ a role can be granted and takes effect immediately                                                           0.66s  
  ✓ a grant can be narrowed to a facility                                                                        0.63s  
  ✓ a grant can be narrowed to a department                                                                      0.60s  
  ✓ a grant can be time limited                                                                                  0.58s  
  ✓ a future start does not grant yet                                                                            0.59s  
  ✓ a grant never crosses a tenant                                                                               0.58s  
  ✓ an account from another tenant cannot be granted to                                                          0.57s  
  ✓ a facility from another tenant cannot be used as a scope                                                     0.62s  
  ✓ the identity administrator may delegate roles they do not hold                                               0.67s  
  ✓ a narrower access administrator cannot delegate beyond their reach                                           0.63s  
  ✓ a disabled account cannot be granted to                                                                      0.59s  
  ✓ the same role cannot be granted twice with the same scope                                                    0.57s  
  ✓ the same role at a different scope is a second grant                                                         0.59s  
  ✓ an expiry in the past is refused                                                                             0.58s  
  ✓ an expiry before the start is refused                                                                        0.59s  
  ✓ someone without roles manage cannot grant                                                                    0.66s  
  ✓ revoking ends access immediately and keeps the record                                                        0.59s  
  ✓ revoking without a reason is refused                                                                         0.59s  
  ✓ you cannot revoke your own access                                                                            0.58s  
  ✓ an already revoked grant cannot be revoked again                                                             0.57s  
  ✓ someone without roles manage cannot revoke                                                                   0.57s  
  ✓ the grant screen lists the accounts grants                                                                   1.62s  
  ✓ the grant screen is closed to someone who cannot manage                                                      0.73s  
  ✓ granting over http works                                                                                     0.60s  
  ✓ an account from another tenant is not reachable over http                                                    0.59s  
  ✓ revoking over http works                                                                                     0.61s  
  ✓ revoking over http requires a reason                                                                         0.63s  
  ✓ a permission marked not granted on a role is not honoured                                                    0.60s  

   PASS  Tests\Feature\GuardianProxyTest
  ✓ a guardian starts pending and grants nothing                                                                 0.62s  
  ✓ a verified guardian holds only its scopes                                                                    0.61s  
  ✓ an expired guardian loses access                                                                             0.64s  
  ✓ a revoked guardian loses access immediately                                                                  0.60s  
  ✓ revocation is recorded not erased                                                                            0.57s  
  ✓ a family relationship alone is not authority                                                                 0.62s  
  ✓ multiple guardians can hold different scopes                                                                 0.60s  
  ✓ guardian pages are permission gated                                                                          0.73s  
  ✓ guardian management is permission gated                                                                      0.79s  
  ✓ guardian data is not visible across tenants                                                                  0.60s  

   PASS  Tests\Feature\InvoiceApprovalTest
  ✓ the three finance people hold deliberately different invoice rights                                          1.05s  
  ✓ the supervisor cannot reach the propose edit door                                                            1.04s  
  ✓ the supervisor can reach the approval door                                                                   1.04s  
  ✓ a proposed edit is not applied until it is fully approved                                                    0.95s  
  ✓ a full double approval applies the change                                                                    0.91s  
  ✓ the initiator cannot give the first approval                                                                 0.93s  
  ✓ the initiator cannot give the second approval                                                                0.92s  
  ✓ the manager cannot be the same person as the supervisor                                                      0.90s  
  ✓ the manager step cannot run before the supervisor step                                                       0.93s  
  ✓ a rejection leaves the invoice unchanged                                                                     0.95s  
  ✓ a rejected request may be submitted again                                                                    0.99s  
  ✓ a second open request is refused for the same invoice                                                        0.98s  
  ✓ a rejection requires a reason                                                                                0.94s  
  ✓ an issued invoice cannot be edited                                                                           0.94s  
  ✓ a manager may propose an edit over http                                                                      0.94s  
  ✓ a non manager cannot propose an edit over http                                                               1.07s  
  ✓ a proposed amount below what is already paid is refused                                                      0.95s  
  ✓ the whole double approval runs over http                                                                     0.95s  

   PASS  Tests\Feature\InvoiceLifecycleTest
  ✓ the administrator can create a draft invoice                                                                 0.94s  
  ✓ a duplicate draft reference is rejected                                                                      0.92s  
  ✓ an issued invoice can be part paid then paid in full                                                         0.96s  
  ✓ a payment can never exceed the outstanding balance                                                           1.03s  
  ✓ a payment cannot be recorded against a draft                                                                 0.98s  
  ✓ a paid invoice can be voided and retains its history                                                         0.94s  
  ✓ a user without the invoice permission is denied                                                              1.10s  
  ✓ an issued invoice cannot be edited back into a draft                                                         0.95s  

   PASS  Tests\Feature\LabOrderCreateTest
  ✓ the lab order form renders for a doctor                                                                      1.12s  
  ✓ the lab order form offers the seeded laboratory tariffs                                                      1.09s  
  ✓ it offers only laboratory tariffs and not other groups                                                       1.12s  
  ✓ a doctor can reach the form but an unprivileged user cannot                                                  1.25s  
  ✓ it does not offer a tariff that is not yet effective                                                         1.14s  
  ✓ ordering a test links the tariff so the order is priced                                                      0.95s  
  ✓ a test cannot be ordered without choosing from the catalogue                                                 0.95s  
  ✓ a clinician cannot order a test from another tenants catalogue                                               0.92s  
  ✓ a test outside the laboratory group cannot be ordered here                                                   0.95s  

   PASS  Tests\Feature\LabReportAuthorisationTest
  ✓ a preliminary report is signed off as final                                                                  0.99s  
  ✓ an authorised report cannot be authorised twice                                                              0.95s  
  ✓ a front desk account reaching the route is refused by the service                                            0.94s  
  ✓ amending a final report leaves the signed original untouched                                                 0.97s  
  ✓ a preliminary report cannot be amended                                                                       0.94s  
  ✓ amending without a reason is refused                                                                         0.99s  
  ✓ a blank reason is refused even when the field is present                                                     0.97s  
  ✓ a doctor without authorise cannot sign off or amend                                                          0.99s  
  ✓ another clinics report is not reachable                                                                      0.95s  
  ✓ an amendment arrives unsigned and cannot be signed off                                                       0.98s  
  ✓ the amended row is the current result                                                                        1.59s  
  ✓ a superseded report cannot be amended again                                                                  1.01s  
  ✓ a correction can be corrected in turn                                                                        0.99s  
  ✓ the review worklist carries the authorised value                                                             1.18s  
  ✓ an amendment reaches the review worklist                                                                     0.99s  
  ✓ the authorise control is rendered for the account the service accepts                                        1.34s  
  ✓ the authorise control is withheld from the account the service refuses                                       1.23s  
  ✓ the amend form is offered only once the report is signed                                                     1.23s  
  ✓ each worklist tab labels the list it is showing                                                              1.35s  

   PASS  Tests\Feature\LoginTest
  ✓ admin can sign in and reach the dashboard                                                                    1.20s  
  ✓ a self service account signs in without a second factor                                                      0.61s  
  ✓ wrong password does not reveal account existence                                                             0.60s  
  ✓ unknown address gets the same message                                                                        0.59s  
  ✓ disabled account cannot sign in                                                                              0.58s  
  ✓ suspended tenant blocks sign in                                                                              0.61s  
  ✓ successful sign in is audited                                                                                0.61s  
  ✓ a completed second factor is audited                                                                         0.66s  

   PASS  Tests\Feature\MfaFlowTest
  ✓ the generated secret is base32 and of sufficient entropy                                                     0.68s  
  ✓ the provisioning uri is machine readable                                                                     0.64s  
  ✓ a valid code passes and an invalid one fails                                                                 0.60s  
  ✓ enrolment stores the secret encrypted                                                                        0.58s  
  ✓ recovery codes are generated hashed and single use                                                           0.64s  
  ✓ the password alone does not sign in an mfa account                                                           0.60s  
  ✓ a valid code completes sign in                                                                               0.84s  
  ✓ a recovery code completes sign in and is consumed                                                            0.66s  
  ✓ an invalid code does not sign in and is audited                                                              0.59s  
  ✓ repeated bad codes lock the challenge                                                                        0.64s  
  ✓ an unenrolled privileged account is blocked until it enrols                                                  0.58s  
  ✓ enrolment requires a correct code before it activates                                                        0.89s  
  ✓ enrolment completes and reveals recovery codes once                                                          0.73s  
  ✓ self service accounts are exempt from mfa                                                                    0.73s  
  ✓ administrator can reset another accounts mfa                                                                 6.89s  
  ✓ a role without permission cannot reset mfa                                                                   0.69s  
  ✓ an account cannot reset its own mfa through the admin route                                                  0.56s  
  ✓ the challenge page reveals nothing about the record                                                          0.69s  
  ✓ signing out clears the second factor session                                                                 0.58s  
  ✓ the users page reports the real mfa posture                                                                  0.71s  
  ✓ the demo code endpoint is unavailable outside the demo environment                                           0.56s  

   WARN  Tests\Feature\MigrationForeignKeyTest
  ✓ no foreign key references a table that does not exist                                                        1.74s  
  ✓ the only out of order foreign keys are the known ones                                                        0.03s  
  ✓ no bare constrained resolves to a table that does not exist                                                  0.03s  
  - the polymorphic allocation column has no foreign key → payment_allocations no longer exists in the forward…  0.04s  

   PASS  Tests\Feature\ModuleRegistryTest
  ✓ all declared modules are registered                                                                          0.56s  
  ✓ a module with an undelivered dependency cannot be enabled                                                    0.56s  
  ✓ require resolvable rejects an undelivered module                                                             0.58s  
  ✓ require resolvable rejects a missing dependency                                                              0.57s  
  ✓ core modules are always enabled                                                                              0.55s  
  ✓ pharmacy edition does not receive clinical modules                                                           0.56s  
  ✓ disabling a module removes it from the tenant                                                                0.56s  
  ✓ a disabled module cannot be used through a direct route                                                      0.70s  
  ✓ edition bundle is applied once                                                                               0.55s  
  ✓ module declarations carry traceable requirement ids                                                          0.56s  

   PASS  Tests\Feature\NutritionWorkspaceTest
  ✓ the nutrition professional can open the department workspace                                                 2.01s  
  ✓ the workspace shows the configured department                                                                0.67s  
  ✓ the work queue is honest about what is not delivered                                                         0.66s  
  ✓ a cashier cannot reach the nutrition workspace                                                               0.67s  
  ✓ a patient cannot reach the nutrition workspace                                                               0.72s  
  ✓ an unenrolled privileged account is sent to setup before any other page                                      0.56s  
  ✓ the pharmacy edition enables the nutrition department                                                        0.58s  
  ✓ nutrition workspace access is moduled as well as permissioned                                                0.71s  

   PASS  Tests\Feature\PatientIndexTest
  ✓ record numbers are tenant scoped and sequential                                                              0.58s  
  ✓ unknown facts are never defaulted                                                                            0.58s  
  ✓ partial dates of birth are labelled not invented                                                             0.60s  
  ✓ a merged record is not found by search                                                                       0.59s  
  ✓ a search finds a patient by name                                                                             0.58s  
  ✓ a search finds a patient by phone and record number                                                          0.57s  
  ✓ a search finds a patient by a recorded identifier                                                            0.58s  
  ✓ a search never reaches another tenant                                                                        0.58s  
  ✓ an empty search returns nothing                                                                              0.58s  
  ✓ a search is audited                                                                                          0.60s  
  ✓ duplicate detection proposes but never merges                                                                0.60s  
  ✓ a weak similarity is not reported as a duplicate                                                             0.57s  
  ✓ registering a patient creates a reviewable candidate                                                         0.59s  
  ✓ registering the same patient twice does not duplicate the review                                             0.58s  
  ✓ a merge is attributed audited and reversible                                                                 0.59s  
  ✓ a merge requires a reason                                                                                    0.58s  
  ✓ a record cannot be merged into itself                                                                        0.59s  
  ✓ an already merged record cannot be merged again                                                              0.58s  
  ✓ an unmerge requires a reason and a merged record                                                             0.58s  
  ✓ an unknown emergency patient is a temporary identity                                                         0.57s  
  ✓ a merged record keeps its history                                                                            0.59s  
  ✓ patient pages are permission gated                                                                           0.79s  
  ✓ patient pages are tenant gated                                                                               0.74s  

   PASS  Tests\Feature\PatientPortalIsolationTest
  ✓ the demo tenant portal is not an edition change                                                              0.65s  
  ✓ the second tenant patient sees her own record and nobody elses                                               0.72s  
  ✓ the same display name in both tenants never crosses                                                          0.66s  
  ✓ the second tenant patient books with her own clinician                                                       0.69s  

   PASS  Tests\Feature\PatientUserLinkTest
  ✓ an email match alone binds nothing                                                                           0.58s  
  ✓ an mrn lookup alone binds nothing                                                                            0.57s  
  ✓ a pending request grants nothing                                                                             0.61s  
  ✓ confirmation must come from a second person                                                                  0.58s  
  ✓ the requester cannot confirm their own request                                                               0.58s  
  ✓ the account under review cannot confirm its own binding                                                      0.59s  
  ✓ revocation ends access and keeps the record                                                                  0.65s  
  ✓ expiry stops resolution without any sweep                                                                    0.67s  
  ✓ an expired binding can be replaced by a new one                                                              0.62s  
  ✓ an account cannot be bound to two patients at once                                                           0.60s  
  ✓ a login cannot be bound across clinics                                                                       0.59s  
  ✓ a staff login cannot be bound to a record                                                                    0.58s  
  ✓ binding and revoking are both audited                                                                        0.59s  
  ✓ the seeded demo binding is created by two people                                                             0.60s  
  ✓ the screen creates only a pending request                                                                    0.61s  
  ✓ the requester is refused as confirmer on screen too                                                          0.61s  
  ✓ a login without the amend permission cannot touch bindings                                                   0.84s  
  ✓ a link of another patient is not reachable through this record                                               0.60s  
  ✓ revoking from the screen keeps the row with who did it                                                       0.59s  

   PASS  Tests\Feature\PatientWalletAccessTest
  ✓ a bound login reaches the patient wallet it is bound to                                                      1.07s  
  ✓ an unbound login reaches no wallet at all                                                                    1.05s  
  ✓ a bound login cannot open another patients wallet                                                            1.00s  
  ✓ revoking the binding closes the wallet on the next request                                                   1.16s  
  ✓ the till still reads and the ward still cannot                                                               1.10s  
  ✓ a bound login raises a qr against its own outstanding invoice                                                1.03s  
  ✓ a binding cannot reach another clinics wallet                                                                1.07s  
  ✓ the pharmacy demo tenant keeps the wallet module closed                                                      1.06s  

   PASS  Tests\Feature\PaymentAdapterTest
  ✓ the administrator can register a sandbox adapter                                                             0.95s  
  ✓ a gateway can only be configured once per mode and tenant                                                    0.96s  
  ✓ the adapter show page never renders the secret key                                                           1.36s  
  ✓ a user without the payment adapter permission is denied                                                      1.11s  

   PASS  Tests\Feature\PaymentCollectionTest
  ✓ an account number is ten digits and unique within the tenant                                                 0.95s  
  ✓ the same patient never gets a second account                                                                 0.98s  
  ✓ a staff wallet is also given an account number                                                               0.99s  
  ✓ a card can be issued against a patient account                                                               1.00s  
  ✓ an account number from another tenant resolves to nothing                                                    0.94s  
  ✓ an invoice number resolves to that invoices payer                                                            0.95s  
  ✓ a patient number resolves to that patients invoices                                                          0.93s  
  ✓ a ten digit account number resolves to the same payer                                                        0.93s  
  ✓ an unknown number resolves to nothing                                                                        0.92s  
  ✓ a patient number from another tenant resolves to nothing                                                     0.95s  
  ✓ an invoice reference is matched exactly and not by prefix                                                    0.93s  
  ✓ one collection settles several invoices and writes one row each                                              0.95s  
  ✓ paying everything in full marks each invoice paid                                                            0.95s  
  ✓ more than an invoice owes is refused and nothing is written                                                  0.95s  
  ✓ a refused line rolls back the whole collection                                                               0.95s  
  ✓ a line cannot name an invoice owed by someone else                                                           0.96s  
  ✓ an invoice from another tenant cannot be named at all                                                        0.93s  
  ✓ collecting from the payers account debits it once                                                            0.97s  
  ✓ an account cannot be collected past its balance                                                              0.96s  
  ✓ a payment point that does not accept the method refuses it                                                   0.92s  
  ✓ an inactive payment point refuses to collect                                                                 0.93s  
  ✓ an account may not be empty                                                                                  0.92s  
  ✓ a wallet funded collection records a valid invoice payment channel                                           0.91s  
  ✓ the same invoice cannot be listed twice in one collection                                                    0.91s  
  ✓ the till screen lists a payers invoices for an authenticated cashier                                         2.20s  
  ✓ the till screen offers the settled and draft invoices nothing                                                1.11s  
  ✓ the till screen reports an unknown number without disclosing anything                                        1.04s  
  ✓ collecting over http settles the invoice and shows a receipt                                                 1.07s  
  ✓ a receipt can be reopened by its reference                                                                   1.03s  
  ✓ another clinics receipt reference reopens nothing                                                            0.93s  
  ✓ only the finance roles can open the till                                                                     2.03s  
  ✓ a user without collect rights cannot open the till                                                           1.07s  
  ✓ a user without collect rights cannot post a collection                                                       1.07s  
  ✓ the legacy payment point collect door is gated too                                                           1.05s  
  ✓ a cashier cannot point the till at another clinics patient                                                   0.94s  

   PASS  Tests\Feature\PayrollTest
  ✓ a built run snapshots everyones payslip with correct maths                                                   0.97s  
  ✓ the seeded run is finalised by a second person                                                               0.92s  
  ✓ a builder cannot finalise their own run                                                                      0.96s  
  ✓ finalised payslips survive later config edits                                                                0.96s  
  ✓ the employee reads their own payslip and nobody elses                                                        1.44s  
  ✓ the cashier reads registers neither nor runs but reads own pay                                               1.38s  
  ✓ the register viewer reads a breakdown but only inside its run                                                1.22s  
  ✓ the run screen states the dec39 gate in plain words                                                          1.39s  
  ✓ statutory components stay unvalidated and the service cannot flip them                                       0.95s  
  ✓ components are per tenant and named once                                                                     1.03s  
  ✓ the pharmacy edition has no payroll or payslip pages                                                         1.04s  

   WARN  Tests\Feature\QrPaymentTest
  ✓ creating an invoice auto issues a qr code                                                                    0.92s  
  ✓ an invoice that becomes payable gets a qr code                                                               0.94s  
  ✓ transitioning a draft to issued issues a qr code                                                             0.93s  
  ✓ a draft invoice is not issued a qr code                                                                      0.91s  
  ✓ every payable invoice in the demo data has a qr code                                                         0.92s  
  ✓ voiding an invoice retires its active qr code                                                                0.93s  
  ✓ a settled invoice is not issued a qr code                                                                    0.97s  
  ✓ a qr code can be scanned at a payment point                                                                  0.92s  
  ✓ a qr code cannot be used twice                                                                               0.95s  
  ✓ an expired qr code is refused and marked expired                                                             0.95s  
  ✓ the qr screen renders a real qr image                                                                        1.03s  
  ✓ the wallet screen links to qr creation                                                                       1.03s  
  ✓ the qr create screen offers the outstanding invoices                                                         1.00s  
  ✓ a qr code can be created for an outstanding invoice                                                          0.94s  
  ✓ a qr code can be created for a specific amount                                                               0.93s  
  - a qr code cannot be raised against another patients invoice → Fixture needs a second patient with a payable… 0.88s  
  ✓ a qr code cannot be raised against a settled invoice                                                         0.89s  
  ✓ a qr code requires an amount or an invoice                                                                   0.90s  
  ✓ a qr code from another clinic does not resolve across tenants                                                0.91s  

   PASS  Tests\Feature\QueueJourneyTest
  ✓ check in from appointment creates a waiting queue entry                                                      0.64s  
  ✓ double check in is rejected                                                                                  0.56s  
  ✓ check in of a cancelled appointment is rejected                                                              0.57s  
  ✓ walk in enters the waiting stage without an appointment                                                      0.57s  
  ✓ emergency walk in bypasses the waiting stage                                                                 0.60s  
  ✓ queue numbers are sequential per day                                                                         0.56s  
  ✓ call next moves from waiting to with clinician                                                               0.59s  
  ✓ call next rejects a non waiting entry                                                                        0.56s  
  ✓ complete finishes the entry and the linked appointment                                                       0.58s  
  ✓ complete rejects a waiting entry                                                                             0.57s  
  ✓ no show finishes a waiting entry and the appointment                                                         0.58s  
  ✓ cancel requires a reason and frees the appointment                                                           0.56s  
  ✓ stage transitions are audited                                                                                0.58s  
  ✓ queue view requires view permission                                                                          0.67s  
  ✓ queue index renders for reception                                                                            0.67s  
  ✓ queue board shows token and initials                                                                         0.68s  
  ✓ tenant isolation on queue entries                                                                            0.65s  
  ✓ walk in requires manage permission                                                                           0.66s  

   PASS  Tests\Feature\ReferralCoordinationTest
  ✓ requesting an external referral records consent owner and timeline                                           0.59s  
  ✓ request requires patient consent                                                                             0.58s  
  ✓ legally permitted exception requires a reason                                                                0.58s  
  ✓ external referral must name the provider                                                                     0.63s  
  ✓ internal referral must target a known department                                                             0.60s  
  ✓ only the patient s own records can be disclosed                                                              0.58s  
  ✓ attachment labels are frozen at request time                                                                 0.59s  
  ✓ internal referral appears incoming and can be accepted by the department                                     0.59s  
  ✓ the requester cannot accept their own referral                                                               0.58s  
  ✓ a role without department permission cannot accept                                                           0.59s  
  ✓ an external referral is not accepted in app                                                                  0.58s  
  ✓ schedule requires an accepted referral                                                                       0.60s  
  ✓ scheduling records the slot                                                                                  0.57s  
  ✓ complete records an outcome and closes the referral                                                          0.59s  
  ✓ complete requires a recorded outcome                                                                         0.59s  
  ✓ decline requires a reason and is terminal                                                                    0.59s  
  ✓ return sends an accepted referral back with its reason                                                       0.63s  
  ✓ a closed referral is immutable                                                                               0.61s  
  ✓ an overdue chase is materialised once and surfaces                                                           0.61s  
  ✓ external requests reach the sandbox outbox and internal ones do not                                          0.61s  
  ✓ receptionist is denied the referrals worklist                                                                0.70s  
  ✓ doctor opens the worklist and the patient record form                                                        1.38s  
  ✓ http requesting a referral lands and redirects                                                               0.75s  
  ✓ results of one tenant are invisible to another                                                               0.58s  
  ✓ lifecycle actions are audited                                                                                0.58s  
  ✓ seed sample covers the whole lifecycle                                                                       0.59s  
  ✓ seeded overdue chase surfaces on the worklist                                                                0.73s  
  ✓ attachments are locked once the referral is closed                                                           0.58s  
  ✓ stranger roles cannot manage referrals                                                                       0.58s  
  ✓ reference is unique per tenant                                                                               0.60s  

   PASS  Tests\Feature\RefundsAndCreditNotesTest
  ✓ a fresh seed gives every paid demo invoice a till row to refund                                              0.93s  
  ✓ a cashier requests a refund and nothing moves until it is approved                                           0.93s  
  ✓ a supervisors approval performs the reversal                                                                 0.94s  
  ✓ the approver must be a different person from the requester                                                   0.96s  
  ✓ the cashier sees the review page but cannot approve                                                          1.14s  
  ✓ a wallet paid amount is credited back to the same wallet                                                     0.93s  
  ✓ a refund cannot exceed what is still refundable                                                              0.94s  
  ✓ a rejected refund moves nothing and records the reason                                                       0.93s  
  ✓ a nurse cannot raise a refund at all                                                                         1.02s  
  ✓ a foreign transaction cannot be attached and a foreign request cannot be seen                                1.03s  
  ✓ a credit note reduces what the till will accept                                                              0.93s  
  ✓ a credit note that settles the invoice alone still settles it                                                0.93s  
  ✓ voiding a credit note restores the balance and the status                                                    0.93s  
  ✓ a settled invoice gets a refund not a credit note                                                            0.95s  
  ✓ a credit note cannot exceed what is still owed                                                               0.97s  
  ✓ the dashboards outstanding figure nets off credit notes                                                      1.22s  

   PASS  Tests\Feature\RosterTest
  ✓ a patient account has no roster door at all                                                                  1.18s  
  ✓ the doctor holds only the self read door                                                                     1.24s  
  ✓ hr reads the full register with derived hours                                                                1.07s  
  ✓ an assignment is audited with its actor                                                                      0.99s  
  ✓ two people may share the same window                                                                         0.96s  
  ✓ an overlapping duty for the same person is refused by name                                                   1.02s  
  ✓ a duty on a day of approved leave is refused                                                                 1.07s  
  ✓ requested leave does not block a duty                                                                        0.97s  
  ✓ amending needs a stated reason                                                                               1.07s  
  ✓ a refused write retains only the form that sent it                                                           1.37s  
  ✓ an amendment rechecks conflicts and is audited                                                               1.00s  
  ✓ cancelling is soft needs a reason and frees the window                                                       1.10s  
  ✓ another clinic cannot be rostered from here                                                                  1.12s  
  ✓ the pharmacy edition has no roster pages                                                                     1.04s  
  ✓ nothing conflict shaped or pay shaped is stored on the row                                                   1.07s  
  ✓ the seeded roster carries all three states                                                                   1.03s  

   PASS  Tests\Feature\SandboxPaymentPolicyTest
  ✓ the application makes no outbound http calls                                                                 4.41s  
  ✓ the cards table cannot hold a full card number or cvv                                                        0.02s  
  ✓ issuing a card persists only a mask and a uid                                                                0.63s  
  ✓ the demo login harness is disabled outside a demo environment                                                0.01s  
  ✓ sandbox status does not relax the overdraft guard                                                            0.63s  

   PASS  Tests\Feature\ServiceTariffCatalogueTest
  ✓ the catalogue lists published tariffs with currency                                                          1.35s  
  ✓ the catalogue filters by group                                                                               1.31s  
  ✓ the invoice form offers effective tariffs                                                                    1.07s  
  ✓ every seeded tariff is versioned and published                                                               0.95s  

   PASS  Tests\Feature\SpecimenLifecycleTest
  ✓ registration allocates a barcode and binds the patient                                                       0.61s  
  ✓ registration accepts a patient supplied barcode but refuses a duplicate                                      0.62s  
  ✓ registration refuses a specimen type outside the known list                                                  0.63s  
  ✓ registration refuses an order belonging to another patient                                                   0.59s  
  ✓ registration refuses a terminal order                                                                        0.59s  
  ✓ collection starts the linked order                                                                           0.63s  
  ✓ collecting twice is refused                                                                                  0.62s  
  ✓ a future collection time is refused                                                                          0.66s  
  ✓ receipt requires a collected specimen and happens once                                                       0.62s  
  ✓ a specimen cannot be received twice                                                                          0.65s  
  ✓ storage requires a location and a received specimen                                                          0.59s  
  ✓ storage records the location and retention date                                                              0.59s  
  ✓ transport annotates the chain without changing custody status                                                0.60s  
  ✓ transport requires a destination                                                                             0.63s  
  ✓ rejection requires a reason code and detail and retains the row                                              0.65s  
  ✓ rejection without detail is refused                                                                          0.61s  
  ✓ recollection creates a new specimen and leaves the rejected one intact                                       0.65s  
  ✓ only a rejected specimen can be recollected                                                                  0.61s  
  ✓ a rejected specimen is recollected only once                                                                 0.61s  
  ✓ an aliquot inherits the patient and collection time                                                          0.59s  
  ✓ an aliquot cannot be taken before the material reaches the laboratory                                        0.60s  
  ✓ an aliquot volume must be positive                                                                           0.58s  
  ✓ disposal is terminal and attributed                                                                          0.61s  
  ✓ disposal requires a method and a reason                                                                      0.62s  
  ✓ a specimen with an outstanding aliquot cannot be disposed                                                    0.64s  
  ✓ a collected but unreceived specimen cannot be disposed                                                       0.64s  
  ✓ a rejected specimen refuses every further transition                                                         0.67s  
  ✓ a terminal specimen cannot be edited through the model                                                       0.58s  
  ✓ the custody trail is ordered and attributed                                                                  0.59s  
  ✓ every movement is audited                                                                                    0.57s  
  ✓ a clinician without the collection verb cannot register                                                      0.55s  
  ✓ the nurse can collect but not work the bench                                                                 0.58s  
  ✓ specimens of one tenant are invisible to another                                                             0.57s  
  ✓ the laboratory worklist opens and renders the custody record                                                 1.79s  
  ✓ a role without the view permission is denied the worklist                                                    0.66s  
  ✓ the laboratory scientist is offered the bench actions                                                        0.70s  
  ✓ the nurse sees only the collection action                                                                    0.70s  
  ✓ a viewer without the process verb is told they cannot act                                                    0.75s  
  ✓ http registration and the full reception flow                                                                0.75s  
  ✓ an acting clinician without the verb is refused at the route                                                 0.57s  
  ✓ a user with patient access but no diagnostics verb is refused the bench                                      0.67s  
  ✓ a user of another tenant cannot reach the bench                                                              0.57s  
  ✓ a specimen outside the active tenant context is unbindable                                                   0.59s  

   PASS  Tests\Feature\SplitPaymentsAndSponsorshipTest
  ✓ tenders that add up exactly take the money and leave one row per tender                                      0.99s  
  ✓ tenders that do not add up are refused and write nothing                                                     0.91s  
  ✓ the till form shape with blank rows is dropped not refused                                                   0.92s  
  ✓ an unticked invoice posting no amount is left alone not refused                                              0.91s  
  ✓ more than three ways of paying are refused                                                                   0.90s  
  ✓ a tender cannot claim a payer that does not sponsor this patient                                             0.90s  
  ✓ a retired payer may not pay a bill even when enrolled                                                        0.91s  
  ✓ a legacy single method call still takes the whole amount                                                     0.90s  
  ✓ a sponsors share is promise and the invoice still owes it                                                    0.90s  
  ✓ the patient cannot pay a slice a sponsor was already promise                                                 0.90s  
  ✓ a share may not exceed the unclaimed balance so two promises cannot overlap                                  0.90s  
  ✓ the credit limit is enforced across everything already promised                                              0.89s  
  ✓ sponsor money coming in settles the promise it was promised under                                            0.92s  
  ✓ sponsor money settles promise fifo so an old promise clears before a new one                                 0.92s  
  ✓ releasing a promise frees the money but keeps the row                                                        0.90s  
  ✓ ending an enrolment stops new promises but keeps existing ones collectable                                   0.91s  
  ✓ an enrolment may not be written over another clinic                                                          0.90s  
  ✓ the sponsorships page is readable by finance but only may enrol under deposits manage                        1.14s  
  ✓ a clinician cannot read sponsorships at all                                                                  1.09s  
  ✓ another clinic cannot see or write these enrolments                                                          0.91s  
  ✓ an administrator may enrol end and release                                                                   0.96s  
  ✓ a collection taken during an open shift is tagged to that shift                                              0.96s  
  ✓ expected cash counts only the cash channel and is reduced by cash refunds                                    0.93s  
  ✓ closing counts the drawer not the total taken                                                                0.94s  

   PASS  Tests\Feature\TenantIsolationTest
  ✓ tenant a context sees only tenant a users                                                                    0.58s  
  ✓ tenant b context sees only tenant b users                                                                    0.57s  
  ✓ same display name in two tenants does not leak                                                               0.57s  
  ✓ unresolved context denies every row                                                                          0.56s  
  ✓ finding a foreign record by key is denied                                                                    0.57s  
  ✓ relations stay inside the tenant                                                                             0.57s  
  ✓ platform accounts are invisible to a tenant context                                                          0.56s  
  ✓ dashboard of one tenant does not show the other tenants records                                              0.82s  
  ✓ users listing of one tenant excludes the other tenant                                                        0.73s  
  ✓ audit reads are scoped to the requesting tenant                                                              0.56s  

   PASS  Tests\Feature\UngatedRouteGuardTest
  ✓ a patient cannot reach with data set "payment points index"                                                  0.99s  
  ✓ a patient cannot reach with data set "payment points create form"                                            0.99s  
  ✓ a patient cannot reach with data set "payment points edit"                                                   1.01s  
  ✓ a patient cannot reach with data set "wards index"                                                           1.00s  
  ✓ a patient cannot reach with data set "wards create form"                                                     1.00s  
  ✓ a patient cannot reach with data set "wards edit"                                                            1.23s  
  ✓ a patient cannot reach with data set "tariffs index"                                                         1.21s  
  ✓ a patient cannot reach with data set "tariffs create form"                                                   0.98s  
  ✓ a patient cannot reach with data set "tariffs edit"                                                          0.98s  
  ✓ a patient cannot reach with data set "product catalogue index"                                               0.99s  
  ✓ a patient cannot reach with data set "product catalogue create form"                                         0.98s  
  ✓ a patient cannot reach with data set "product catalogue edit"                                                0.98s  
  ✓ a patient cannot reach with data set "drug administrations index"                                            0.99s  
  ✓ a patient cannot reach with data set "drug administrations create form"                                      0.99s  
  ✓ a patient cannot reach with data set "drug administrations edit"                                             0.99s  
  ✓ a patient cannot reach with data set "another patients wallet"                                               0.91s  
  ✓ a patient cannot reach with data set "another patients wallet edit"                                          0.90s  
  ✓ a patient cannot reach with data set "another patients q r codes"                                            0.90s  
  ✓ a patient cannot reach with data set "another patients q r create form"                                      0.90s  
  ✓ a patient cannot reach with data set "another accounts card"                                                 0.91s  
  ✓ a patient cannot reach with data set "another accounts card edit"                                            0.90s  
  ✓ a patient cannot reach with data set "staff register"                                                        0.99s  
  ✓ a patient cannot reach with data set "staff create form"                                                     0.99s  
  ✓ a patient cannot reach with data set "staff profile"                                                         1.00s  
  ✓ a patient cannot reach with data set "staff edit form"                                                       0.97s  
  ✓ a patient cannot reach with data set "leave ledger"                                                          0.99s  
  ✓ a patient cannot reach with data set "credential register"                                                   1.00s  
  ✓ a patient cannot reach with data set "credential create form"                                                0.98s  
  ✓ a patient cannot reach with data set "credential profile"                                                    1.00s  
  ✓ a patient cannot reach with data set "credential edit form"                                                  0.97s  
  ✓ a patient cannot write to the product catalogue                                                              0.98s  
  ✓ a patient cannot rename a ward                                                                               0.99s  
  ✓ the patient keeps their own wallet and card door                                                             1.24s  
  ✓ a patient cannot read a qr code issued to someone else                                                       0.90s  
  ✓ the administrator still administers                                                                          1.64s  
  ✓ the till operator sees prices but cannot change them                                                         1.54s  
  ✓ the clinician reaches the clinical screens the administrator cannot                                          1.17s  
  ✓ a foreign clinic cannot read a ward even holding the permission                                              0.91s  

   PASS  Tests\Feature\VitalsEditRoundTripTest
  ✓ a doctor can open the vitals edit form                                                                       1.07s  
  ✓ a doctor can save a vitals change                                                                            0.91s  
  ✓ a nurse can save a vitals change                                                                             0.93s  
  ✓ an amendment cannot reassign who recorded the reading                                                        0.89s  
  ✓ a front desk account cannot read or change a vital                                                           1.11s  
  ✓ a patient cannot amend a chart even their own                                                                1.09s  
  ✓ another clinics vital is not editable                                                                        0.92s  
  ✓ a vital cannot be amended through a different patients url                                                   0.92s  
  ✓ an impossible reading is refused and does not overwrite the chart                                            0.92s  

   PASS  Tests\Feature\WalletPaymentTest
  ✓ a wallet is created on first access and starts empty                                                         0.89s  
  ✓ a credit increases the balance and is recorded                                                               0.90s  
  ✓ a debit reduces the balance                                                                                  0.90s  
  ✓ a credit of zero or less is refused                                                                          0.90s  
  ✓ a debit of zero or less is refused                                                                           0.90s  
  ✓ a wallet cannot be overdrawn                                                                                 0.96s  
  ✓ an inactive wallet cannot be spent from                                                                      0.90s  
  ✓ an issued card is masked and carries no full pan                                                             0.99s  
  ✓ tap to pay debits the card wallet at the payment point                                                       0.90s  
  ✓ a frozen card cannot be used for tap to pay                                                                  0.89s  
  ✓ a qr scan deducts from the wallet                                                                            0.90s  
  ✓ a qr code cannot be reused                                                                                   0.90s  
  ✓ an expired qr code is refused and marked expired                                                             0.90s  
  ✓ cash collection records against the invoice without touching a wallet                                        0.90s  
  ✓ an unknown payment method is refused                                                                         0.88s  
  ✓ a payment point cannot collect a non positive amount                                                         0.89s  
  ✓ wallet transactions are not reachable from another tenant                                                    0.91s  
  ✓ a card is not reachable from another tenant                                                                  0.90s  
  ✓ a qr code is not reachable from another tenant                                                               0.90s  

   PASS  Tests\Feature\WardAndPatientStatusTest
  ✓ a ward can be created with a matron and location                                                             0.92s  
  ✓ a ward can be amended                                                                                        0.94s  
  ✓ a ward cannot name another clinics staff member as matron                                                    0.91s  
  ✓ a ward cannot be reassigned to a foreign matron by amendment                                                 0.91s  
  ✓ a ward from another clinic is not readable                                                                   0.90s  
  ✓ the ward index renders with the seeded wards                                                                 1.06s  
  ✓ emergency contact and health status round trip                                                               0.93s  
  ✓ emergency contact can be cleared                                                                             1.00s  
  ✓ another clinics patient is not editable                                                                      0.93s  
  ✓ the patient record shows the seeded emergency contact                                                        1.17s  
  ✓ the patient edit form offers the emergency contact and status fields                                         1.60s  
  ✓ the registration form carries the emergency contact and store persists them                                  1.04s  
  ✓ a patient can be edited with the date of birth left blank                                                    0.92s  

   PASS  Tests\Feature\WelfareTest
  ✓ hr raises and the admin decides a two person request                                                         0.98s  
  ✓ the recorder cannot decide their own request                                                                 0.94s  
  ✓ a refusal keeps its stated reason and decided rows are immutable                                             0.96s  
  ✓ an amount is recorded as a fact and never validated                                                          0.94s  
  ✓ an account without the view door sees only its own requests                                                  1.27s  
  ✓ a nurse may raise her own request but not decide any                                                         1.24s  
  ✓ the requester can withdraw but a stranger cannot                                                             0.93s  
  ✓ patient accounts have no welfare door                                                                        1.09s  
  ✓ the pharmacy edition has no welfare pages                                                                    0.92s  
  ✓ the seeded ledger shows the two person shape on the page                                                     1.10s  

  Tests:    2 skipped, 864 passed (3891 assertions)
  Duration: 787.99s

