Contact parent hierarchy
Summary
Contacts now support an optional parentContact reference so practices can group contract-level contacts (for example BUPA Gold) under a root contact (for example BUPA) while keeping patient insurer relationships unchanged.
API changes
createContactnow accepts optionalparentContact: ID.updateContact(contactData:)now accepts optionalparentContact: ID.Contactnow exposesparentContact: IDon reads.
To clear an existing parent and return a child contact to root level, pass parentContact: null in updateContact.
Validation behaviour
When setting parentContact, the API validates that the target:
- is an active Contact,
- belongs to the same practice,
- is not the same contact (no self-reference),
- does not create a cycle,
- is a root contact (single-level hierarchy in v1).
Deleting a root contact with active children is blocked until children are unlinked or reassigned.
Patient relationships
Patient relatedAccounts are unchanged. Updating contact parent hierarchy does not modify existing patient insurer relationship data.