Documentation
¶
Overview ¶
Package medicalhistory is a demo module: the same crudview.New pattern. platformd/modules/devices uses for a full CRUD view, with one addition — a selectsearch.SelectSearch fills crudview.Config.Filter instead of the default searchbar.SearchBar. SelectSearch satisfies widget.Filterable (github.com/tinywasm/components v0.5.0) the same generic contract a SearchBar fills, so picking a patient from today's agenda narrows the visit list to that patient's fichas — no bespoke wiring in crudview or rightpanel.
Index ¶
Constants ¶
const Icon = svg.Icon("mod-medicalhistory")
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module is the platformd.UIModule. It carries the platform because, like devices, it notifies save/delete results in the chassis message bar.
func (*Module) IconSvg ¶
IconSvg registers the module's glyph — the original medicalhistory icon: a clipboard (patient chart) with a checkmark badge and two list lines. 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.
type Patient ¶
Patient is a LOCAL FAKE type for this demo only — today's agenda. A real deployment replaces todayAgenda with a router.Caller call into appointment_booking (today's reservations for a staff member); this repo never imports it. Every patient/visit record here is fake, package-level, in-memory data, same tier as devices' deviceDB below.
type Visit ¶
type Visit struct {
Id, Patient, Doctor, Date, Reason, Diagnosis string
}
func (*Visit) DecodeFields ¶ added in v0.1.13
func (v *Visit) DecodeFields(r model.FieldReader)
func (*Visit) EncodeFields ¶ added in v0.1.13
func (v *Visit) EncodeFields(w model.FieldWriter)
func (*Visit) Item ¶ added in v0.1.13
Item projects a visit as a list row: the leading badge carries the date (see leadFromDate), Label the reason, Description the attending doctor — the list is always reached by picking a patient first (see medicalhistory.go's requirePatient), so every visible row already belongs to that one patient; what a row's own badge still needs to say is WHO saw them, not whose visit it was.