prescription.document#
Prescription Document Model
Intermediate representation that decouples section data collection from rendering. Sections write only to this model; renderers read only from this model.
Kramer Harrison, 2026
Classes
|
Top-level document model. |
|
A sequence of key-value pairs. |
|
One labelled section of the document. |
Visual separator (horizontal rule / blank line). |
|
|
A structured table with pre-formatted string cells. |
|
A free-form paragraph or note. |
- class Document(title: str, generated_at: str, sections: list[~prescription.document.Section] = <factory>)[source]#
Top-level document model.
- class KeyValueBlock(rows: list[tuple[str, str]], title: str | None = None)[source]#
A sequence of key-value pairs.
- class Section(title: str, blocks: list[~prescription.document.KeyValueBlock | ~prescription.document.TableBlock | ~prescription.document.TextBlock | ~prescription.document.SeparatorBlock] = <factory>)[source]#
One labelled section of the document.
- blocks: list[KeyValueBlock | TableBlock | TextBlock | SeparatorBlock]#