Crate vpr_core

Source
Expand description

§VPR Core

Core business logic for the VPR patient record system.

This crate contains pure data operations and file/folder management:

  • Patient creation and listing with sharded JSON storage
  • File system operations under the configured patient data directory
  • Git-like versioning

No API concerns: Authentication, HTTP/gRPC servers, or service interfaces belong in api-grpc, api-rest, or api-shared.

Re-exports§

pub use config::CoreConfig;
pub use constants::DEFAULT_PATIENT_DATA_DIR;
pub use author::Author;
pub use author::AuthorRegistration;
pub use patient::PatientService;

Modules§

author
Author-related types and functions.
config
Core runtime configuration.
constants
Constants used throughout the VPR core crate.
error
Error types for the VPR (Virtual Patient Record) system.
markdown
Markdown validation and sanitisation for coordination thread messages.
paths
On-disk path definitions for VPR artefacts.
patient
Patient service and related types.
repositories
Repository management modules.
versioned_files
Versioned file operations with Git-based version control for VPR.

Structs§

EmailAddress
A syntactically plausible email address.
NonEmptyText
A string type that guarantees non-empty content.
ShardableUuid
VPR’s canonical UUID representation (32 lowercase hex characters, no hyphens).
TimestampId
A time-prefixed timestamp identifier for ordering events and records.
TimestampIdGenerator
Generator for creating TimestampId values with monotonicity guarantees.
Uuid
A Universally Unique Identifier (UUID).

Enums§

TextError
Errors that can occur when creating validated text types.