Skip to main content

Persons

Persons (FHIR Person) represent a common demographic record that may be linked to multiple patient, practitioner, or related person records. They are useful for identity management and record linkage across the system.

Create a Person

const { data: person } = await clinik.persons.create({
  firstName: 'Maria',
  lastName: 'Garcia',
  phone: '555-0142',
  email: '[email protected]',
  gender: 'female',
  birthDate: '1985-07-22',
  address: {
    line: ['456 Oak Avenue'],
    city: 'San Antonio',
    state: 'TX',
    postalCode: '78205',
  },
  managingOrganizationId: 'org_sunrise',
});
A person can be linked to patient, practitioner, or related person records with varying levels of assurance:
const { data } = await clinik.persons.create({
  firstName: 'James',
  lastName: 'Wilson',
  email: '[email protected]',
  link: [
    { targetId: 'Patient/pt_james_wilson', assurance: 'level4' },
    { targetId: 'Practitioner/dr_wilson', assurance: 'level3' },
  ],
});

Assurance Levels

LevelDescription
level1No matching criteria met
level2Some criteria met
level3High confidence match
level4Verified — this is the same person

Update a Person

await clinik.persons.update(person.id, {
  phone: '555-0199',
  link: [
    { targetId: 'Patient/pt_maria_garcia', assurance: 'level4' },
  ],
});

Search Persons

const { data } = await clinik.persons.search({
  name: 'Garcia',
  active: true,
});

Person vs Patient

ResourcePurpose
PersonIdentity record — links across systems
PatientClinical record — encounters, observations, medications
Use Person when you need to track a single individual across multiple roles or systems. Use Patient for clinical care data.