Skip to main content

Health Network

Everything you keep in OnEarly — a blood pressure reading, a meeting note, a file, a form, a task — is a piece of content. Each piece of content has a content type that says what it is and what shape it takes. Pieces of content link to each other, so related information stays together.

Types and instances​

There are two kinds of content:

KindWhat it isExample
Content typeA schema: the name, value type, settings and named fields that instances must follow. A content type is itself stored as content, so it has an owner, can be shared and keeps a version history.Blood Pressure
InstanceOne record of a content type.120/80, measured this morning

Each instance records the exact version of the content type it was created against. Changing a type later does not rewrite instances that already exist.

In the API these are called types and instances.

What an instance holds​

FieldMeaning
ValueThe instance's value, held in the field that matches its value type (see below).
Content typeThe type, at the exact version used.
SubjectWho the content is about. This can differ from who created it — for example, a clinic records a result about a patient.
Occurred atWhen the thing it describes happened, as opposed to when it was recorded.
UnitThe unit of a numeric value, from the units the type allows.
Created at / Updated atWhen the content was first recorded and last changed.

Value types​

Every content type declares one value type.

Value typeHoldsExample
STRINGText"120/80"
NUMERICA number72
BOOLEANTrue or falsetrue
DATEA calendar date, YYYY-MM-DD"1984-03-12"
DATETIMEA date and time in ISO 8601, with a time-zone offset"2026-11-04T09:30:00+11:00"
ENUMOne value from the type's list of allowed values"MANUAL"
JSONA structured JSON documenta saved view's settings

There is no range value type. A range is modelled as fields (for example, a low and a high value) or as JSON.

What a content type can declare​

SettingPurpose
DescriptionPlain-language explanation of the type.
Allowed valuesFor ENUM types: the list of values, each with a display label.
Allowed unitsFor numeric types: which units an instance may use.
FieldsNamed slots that instances fill with other content, each with a minimum and maximum count. See below.
ReferenceTurns a text field into a lookup that points at an instance of another type, such as a contact.
FileMarks the type as a file and lists the file formats it accepts.
SignatureMarks the type as holding a captured signature.
ConformanceHow strictly instances must match the declared fields: open, lax or strict.

Fields​

A content type declares its fields by linking to other content types. Each field has:

  • a key — the field's name, unique within the type (for example phone_number)
  • a minimum and maximum count — for example, a contact has 0 or more email addresses and at most one website
  • a position — the order fields appear in
  • an optional description

References​

A reference field points at an instance of another type instead of holding the value itself. A meeting note's Attendee field, for example, points at a Contact. A reference declares:

  • the target type
  • whether the target is shared with whoever can see the content that holds the reference
  • whether the app should offer to create a new target on the spot (forbidden, optional or required)

Content links to other content. Each link has one of three kinds.

LinkBehaviourTypical use
CONTAINSParent and child. Each piece of content has at most one parent, so these links form a tree. Deleting a parent deletes everything under it.A folder of results; a request and its steps
INCLUDESEmbeds another piece of content without owning it. Deleting the holder leaves the included content in place.A field value; a reference to a contact
RELATES_TOA peer link between two pieces of content, in any number. No ownership and no cascade.A note that relates to a result

Every link also records:

  • Certainty — ASSERTED (stated as fact), INFERRED (worked out from other information) or SUGGESTED (proposed, not confirmed).
  • Carbon copy — whether people who can see the parent can also see the child through this link. Turning carbon copy off keeps a child private even when its parent is shared. See Permissions & Roles.
Links between content
Links between content

Units​

Units have a notation (for example kg), a display form and a description. These units are available out of the box:

UnitUnitUnit
kgglb
ozmlkcal
kmmim
min/kmmin/miserving
unit

Versions and history​

Content is never overwritten.

  • Editing content adds a new version and retires the old one. All versions of one piece of content share a lineage, so you can follow its history.

  • Each version records why it exists: CREATE, EDIT, RETRACTED or REVERTED.

  • Every change is recorded as one operation that says who made it, who they were acting as, and when. Shares and link changes are recorded the same way.

  • Content types follow the same rules. A new version of a type does not change instances created against an earlier version.

  • A content type has no draft, published or deprecated state. Every version of a type can be used.

Built-in content types​

OnEarly provides content types that everyone can use. They are readable by every person and group, which is what lets you create instances of them.

FamilyTypes
Blood pressureBlood Pressure (text such as 120/80), with Systolic, Diastolic and Pulse (numeric) and Measured At (date and time)
MeetingsMeeting Note, with Location, Held At and Attendee (a reference to a Contact)
AppointmentsAppointment, with Starts At, Ends At, Location and Source (BOOKING, GOOGLE_CALENDAR, OUTLOOK or MANUAL)
Conversation summariesChat Summary, with Text, Summarised At and Trigger (USER_REQUEST or WORKFLOW)
ContactsContact, with first and last name, email (0 or more), phone number (0 or more), date of birth, sex at birth, address lines, note and website (at most one)
AddressesAddress, with Address Line 1 and 2, Suburb, State, Postcode and Country
EmailEmail Message, with Subject, From, To, Cc, Sent At and Body
Personal detailsFirst Name, Last Name, Email, Phone Number, Date of Birth, Sex Assigned at Birth
Page building blocksNote, Markdown, Paragraph, Table, Link, URL, Description, Container, Attachment, File, Cover Image

Your own content types​

Any person or group can create content types. In the app, go to Account → Content Types for your own, or Group settings → Content types for a group's.

  • A content type you create belongs to you (or your group) and is private until you share it.
  • To create an instance of a type, you need at least view access to that type.