Data Structures

2025-10-08 | ๐Ÿ“‘ 145 words | โฑ 2 mins | ๐Ÿงพ History | โœ NHS Notify | ๐Ÿ”‘ NHS Notify

๐Ÿšง This page has less that 200 words. So it looks like this page is still under construction.

Known Issues / Todo

  • โ›… This page is draft and is subject to rapid change, and may not be fully accurate or complete

The following mermaid diagram is generated from the internal datastore implementation, and is generated by the generate dependencies hook.

Data Store Schemas

This document contains the mermaid diagrams for the data store schemas used in the application.

The schemas are generated from Zod definitions and provide a visual representation of the data structure.

Letter schema

erDiagram
    Letter {
        string id
        string status "enum: PENDING, ACCEPTED, REJECTED, PRINTED, ENCLOSED, CANCELLED, DISPATCHED, FAILED, RETURNED, DESTROYED, FORWARDED, DELIVERED"
        string specificationId
        string groupId
        number reasonCode
        string reasonText
        string supplierId
        string url "url"
        string createdAt
        string updatedAt
        string supplierStatus
        string supplierStatusSk
        number ttl "min: -9007199254740991, max: 9007199254740991"
    }

MI schema

erDiagram
    MI {
        string id
        string supplierId "ref: Supplier"
        string specificationId
        string groupId
        string lineItem
        number quantity
        number stockRemaining
        string createdAt
        string updatedAt
    }
    Supplier {
    }
    MI }o--|| Supplier : "supplierId"