## Introduction

For providers that operate across multiple regions and specialties, properly representing provider credentials is critical for regulatory compliance, insurance billing, and referral management. In the U.S., virtual providers must ensure that physicians are licensed in the same state as their patients. Another important operational consideration is making sure that care coordinators, nurses, and doctors are practicing at the top of their license.

## Key Elements

The key FHIR element for storing all licenses and degrees is the `Practitioner.qualifications` element. This is an array of all degrees, licenses, and certifications achieved by the provider.

The two most important sub-elements are:

| Element | Description |
| --- | --- |
| `Practitioner.qualifications[i].code` | This [`CodeableConcept`](/content/docs/fhir-basics#standardizing-data-codeable-concepts/index.html) is used to identify the type of certification |
| `Practitioner.qualifications[i].issuer` | The organization responsible for issuing the certification |

The next sections discuss how to populate these elements for state medical licenses and specialty board certifications.

### Looking up provider data

Rather than entering NPI, taxonomy, and license data by hand, you can pull much of it from the public [NPPES NPI Registry](https://npiregistry.cms.hhs.gov/api-page) maintained by CMS. See the [NPPES Lookup Bot](https://github.com/medplum/medplum/tree/main/examples/medplum-demo-bots/src/nppes-lookup.ts) for a thin wrapper around the registry API that you can call from another bot to populate `Practitioner.identifier` (NPI), `Practitioner.qualification`, and `PractitionerRole.specialty` (NUCC taxonomy codes).

## Medical Licensure

In the U.S., medical licenses are issued by each state's medical board, and are only valid for patients in that state.

Use the HL7 `degreeLicenseCertificate` code system ( [http://terminology.hl7.org/CodeSystem/v2-0360](http://terminology.hl7.org/CodeSystem/v2-0360)) to model the license level achieved by the provider (MD, DO, RN, NP, etc.).

The `issuer` is typically the state (e.g., "State of New York"). Although this element is typically a reference to an `Organization`, in for the sake of simplicity we recommend simply use the `display` element, rather than creating an `Organization` resource for each state.

To augment the `issuer`, the Davinci PDEX implementation guide [defines an extension](https://build.fhir.org/ig/HL7/davinci-pdex-plan-net/StructureDefinition-practitioner-qualification.html) for `Practitioner.qualification`, named `practitioner-qualification`. This extension contains an element, `whereValid` , which allows you to represent medical license jurisdictions using USPS postal codes for convenience.

### Example

```ts
{
  
  id: 'JoeSmith',

resourceType: 'Practitioner',

name: [
    {
      text: 'Joe Smith, MD',
      family: 'Smith',
      given: ['Joe'],
    },
  ],

qualification: [
    {
      code: {
        coding: [
          {
            system: 'http://terminology.hl7.org/CodeSystem/v2-0360',
            code: 'MD',
          },
        ],
        text: 'MD',
      },

issuer: {
        display: 'State of New York',
      },

extension: [
        {
          url: 'http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/practitioner-qualification',
          extension: [
            {
              url: 'whereValid',
              valueCodeableConcept: {
                coding: [
                  {
                    system: 'https://www.usps.com/',
                    code: 'NY',
                  },
                ],
              },
            },
          ],
        },
      ],
    },
  ],
};
```

## Medical Specialty

A provider's specialty certifications can also be represented Unlike licensure, medical specialties are determined by professional boards of physicians, not governments. Here are the key points to consider:

- **Specialty Code**: The PDEX implementation guide requires selecting a provider's specialty code from the [NUCC provider taxonomy](https://taxonomy.nucc.org/) (system: `http://nucc.org/provider-taxonomy`).
- **Issuer**: The issuer for specialist certifications are typically professional certification boards (e.g. American Board of Internal Medicine or American College of Obstetricians and Gynecologists )

### Example

```ts
{
  
  id: 'JoeSmith',

resourceType: 'Practitioner',

name: [
    {
      text: 'Joe Smith, MD',
      family: 'Smith',
      given: ['Joe'],
    },
  ],

qualification: [
    {
      code: {
        coding: [
          {
            system: 'http://nucc.org/provider-taxonomy',
            code: '207R00000X',
            display: 'Internal Medicine Physician',
          },
        ],
        text: 'Board Certified Internal Medicine',
      },

issuer: {
        display: 'American Board of Internal Medicine',
      },

extension: [
        {
          extension: [
            {
              url: 'status',
              valueCode: 'active',
            },
            {
              url: 'whereValid',
              valueCodeableConcept: {
                coding: [
                  {
                    system: 'https://www.usps.com/',
                    code: 'NY',
                  },
                ],
              },
            },
          ],
          url: 'http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/practitioner-qualification',
        },
      ],
    },
    {
      code: {
        coding: [
          {
            system: 'http://nucc.org/provider-taxonomy',
            code: '207RC0000X',
            display: 'Cardiovascular Disease Physician',
          },
        ],
        text: 'Board Certified Cardiovascular Disease',
      },

issuer: {
        display: 'American Board of Internal Medicine',
      },

extension: [
        {
          extension: [
            {
              url: 'status',
              valueCode: 'active',
            },
            {
              url: 'whereValid',
              valueCodeableConcept: {
                coding: [
                  {
                    system: 'https://www.usps.com/',
                    code: 'NY',
                  },
                ],
              },
            },
          ],
          url: 'http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/practitioner-qualification',
        },
      ],
    },
  ],
};
```

`Practitioner.qualification` vs. `PractitionerRole.specialty`

Both the `Practitioner.qualification` and `PractitionerRole.specialty` elements can be used to represent a provider's specialization, but there are important differences between how they are used.

- `Practitioner.qualification` indicates the specific qualifications that a provider has obtained, and are associated with the provider's _person_. This is useful for illustrating a provider's overall skill set, education, and training, regardless of their current role or where they're practicing.
- `PractitionerRole.specialty` indicates the particular specialty a provider is currently practicing in a specific context or organization. This is more flexible as a provider can have different roles in different organizations or at different times. For example, a practitioner who is qualified as both a cardiologist and an internist might serve as a cardiologist at one hospital and an internist at another.

## Conclusion

The `Practitioner.qualification` element is the place to store all Practitioner licenses and credentials. The key is to use standard code systems to support data exchange with other systems. In this guide we've summarized the main points of the [Davinci PDEX Payer Network](https://build.fhir.org/ig/HL7/davinci-pdex-plan-net/index.html) IG to serve a starting point for your implementation.
