# `DoseRecordId` — `src/domain/value_objects/dose_record_id.rs`
Unique identity for a [`DoseRecord`](../entities/dose_record.md) aggregate.
Wraps a UUID v7 — each call to `new()` produces a globally unique, time-sortable value.
---
## Constructor
```rust
pub fn create() -> DoseRecordId // generates UUID v7 (time-sortable)
pub fn from_uuid(uuid: Uuid) -> DoseRecordId // wraps an existing UUID
impl Default for DoseRecordId { ... } // delegates to create()
```
---
## Methods
| `value()` | `Uuid` | Returns the underlying UUID |
| `to_string()` | `String` | Formats as a UUID string |
---
## Usage
```rust
use bitpill::domain::value_objects::dose_record_id::DoseRecordId;
let id = DoseRecordId::create();
assert!(!id.to_string().is_empty());
assert_ne!(DoseRecordId::create(), DoseRecordId::create());
```
`DoseRecordId` is generated by `DoseRecord::new()`.
It is used as the lookup key in
[`DoseRecordRepository`](../../application/ports/dose_record_repository.md)
and passed to
[`MarkDoseTakenService`](../../application/services/mark_dose_taken_service.md)
to identify which dose the user is confirming.