medicalhistory

package
v0.1.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package medicalhistory is a demo module: selectsearch.SelectSearch (now widget.Filterable — see github.com/tinywasm/components v0.5.0) drives a rightpanel.RightPanel master-detail. Pick a patient from today's agenda, their history loads on the other side. It is the pattern to copy for a real "select one, load its detail" module — the same role platformd/modules/devices plays for full CRUD.

Index

Constants

View Source
const Icon = svg.Icon("mod-medicalhistory")

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct{}

Module is the platformd.UIModule. It carries no state of its own — View() builds a fresh *View per call, which is where the demo's state (the signals, the fake agenda) actually lives.

func New

func New() *Module

func (*Module) Icon

func (m *Module) Icon() svg.Icon

func (*Module) IconSvg

func (m *Module) IconSvg() *sprite.Sprite

IconSvg registers the module's glyph: a plain plus/cross built only from straight lines (no curves to get wrong) in a 24x24 box. tinywasm/ssr fuses every IconSvg() in the graph into one sprite injected into <body>.

The receiver is instantiated as a zero value (&medicalhistory.Module{}), so this method must not touch any field — it only returns definitions.

func (*Module) Label

func (m *Module) Label() string

func (*Module) ModelName

func (m *Module) ModelName() string

func (*Module) View

func (m *Module) View() Component

type Patient

type Patient struct {
	ID   string
	Name string
	Time string
}

Patient and Visit are LOCAL FAKE types for this demo only. A real deployment replaces todayAgenda/visits below with router.Caller calls into appointment_booking (today's reservations for a staff member) and clinical_encounter (ListVisitsByPatient) — this repo never imports either.

type View

type View struct {
	Element
	// contains filtered or unexported fields
}

View is the module's content. Embeds Element as a VALUE (never a pointer — TinyGo heap constraint, see AGENTS.md).

func (*View) Init

func (v *View) Init(ctx Ctx)

func (*View) Render

func (v *View) Render() *Element

type Visit

type Visit struct {
	Date      string
	Reason    string
	Diagnosis string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL