Documentation / Viewer
A resource: Family
An interactive family tree: generations up and down, siblings, marriages, step-parents and adoptions.

- Family tab – Shown for Patient, Person, RelatedPerson and Practitioner resources.
- People shown – The direct line with the siblings at every level, or everyone connected.
- Selected person – Highlighted; generations above and below are drawn in rows.
- Former spouse – A dashed line with a break; Robert remarried, and Lily is the child of the second marriage.
- Step-parent – Step and foster parents have their own line to the child.
- Twins – A bar joins twins; an adopted child has a green dashed line.
- Details – Relation, records of the person (with links) and Show family of this person.
Patient, Person, RelatedPerson and Practitioner resources have a Family tab. It draws the family of the person: all generations above (parents, grandparents…), all generations below (children, grandchildren…) and the brothers and sisters at every level, with partners, former spouses and step-parents.
How FHIR® records a family
- A RelatedPerson is a person related to a patient:
RelatedPerson.patientpoints to the patient andRelatedPerson.relationshipsays what the related person is to the patient, with the HL7® v3 RoleCode family codes (MTH mother, FTH father, STPMTH stepmother, HSIS half-sister, TWINBRO twin brother, ADOPTM adoptive mother, FMRSPS former spouse, MGRMTH maternal grandmother…).RelatedPerson.periodis when the relation was valid: a spouse whose period has ended is drawn as a former spouse. - One real person often has several records: a Patient of their own, and a RelatedPerson for every patient they are related to. A Person resource ties them together (
Person.link.targetto Patient, Practitioner, RelatedPerson or Person), andPatient.link.othercan point to a RelatedPerson of the same individual. The tab merges these records into one person, so a whole family is found from the records of any member. - Relationship codes the tree cannot place (aunt, cousin, in-laws, guardian, emergency contact…) are listed under Other relationships. Without a code the display text is read (English words such as “stepfather”).
Using the tree
- Show
- Direct line and siblings: ancestors, descendants and their siblings, with their partners and the other parents of their children. Everyone connected: every person reached through family relations.
- Lines
- Spouses are joined by a solid line, former spouses by a dashed line with a break, partners by a dotted line. Children hang from the middle of the couple; step and foster parents have their own line; adopted children a green dashed line; a bar joins twins. Siblings whose parents are not recorded are joined by a bracket above them, a grandparent recorded without the parent in between by a dashed curve.
- Boxes
- Name, years of birth and death (†) and the record types of the person (Pat, Prac, Pers, RP). The colour stripe shows the gender; the selected person is highlighted.
- Moving around
- Drag to move, mouse wheel or + / − to zoom, Fit to see everything. Drag the bottom right corner to make the tree larger or smaller (arrow keys work on the focused corner too); double-click the corner for the default size. The size is remembered; when the tree is wider the details panel moves below it. Hover a person to highlight their relations; click (or Tab and Enter) to see the relation to the selected person, their records with links and Show family of this person.
ExampleA blended family
Load the demo family (node test/fixtures/family-demo.js family-demo.ndjson, then load the file into a data source) and open Patient/anna → Family: Robert has a former wife Linda (Anna's mother) and a wife Susan (Anna's stepmother, mother of Lily); Anna and David have twins and an adopted daughter.
NoteNeeds
viewer:browse and access to RelatedPerson. People whose record types you may not see stay in the tree as Not shown, restricted records as Restricted record; with masking, names are initials and dates years. At most 200 people are collected.