Skip to main content

Organizations

Organizations (FHIR Organization) represent healthcare providers, hospital departments, insurance companies, and other entities involved in care delivery. They form the organizational hierarchy that practitioners and services belong to.

Create an Organization

const { data: org } = await clinik.organizations.create({
  name: 'Sunrise Medical Center',
  type: ['prov'],
  phone: '555-0100',
  email: '[email protected]',
  address: {
    line: ['100 Health Blvd'],
    city: 'Austin',
    state: 'TX',
    postalCode: '78701',
    country: 'US',
  },
  contact: [
    {
      purpose: 'billing',
      firstName: 'Sarah',
      lastName: 'Johnson',
      email: '[email protected]',
      phone: '555-0101',
    },
    {
      purpose: 'admin',
      firstName: 'Mike',
      lastName: 'Chen',
      email: '[email protected]',
    },
  ],
});

Organization Hierarchy

Create departments as child organizations:
const { data: dept } = await clinik.organizations.create({
  name: 'Cardiology Department',
  type: ['dept'],
  partOfId: org.id,
  phone: '555-0110',
});

Organization Types

TypeDescription
provHealthcare provider
deptHospital department
teamCare team
govtGovernment
insInsurance company
payPayer
eduEducational institution
busNon-healthcare business

Search Organizations

const { data } = await clinik.organizations.search({
  name: 'Sunrise',
  type: 'prov',
  active: true,
});