> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clarionhealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Match Patient

> Find a patient at the practice from identifying details.

Which fields are required depends on the practice's match rules. If the request doesn't have enough fields, the response has `status: "insufficient-information"` and lists the fields each rule needs.

On `status: "matched"`, `patient.patient_id` is the ID to pass to `GET /patient/{id}/chart`.



## OpenAPI

````yaml POST /patient/match
openapi: 3.0.1
info:
  title: Clarion API
  description: >-
    Clarion's public facing API. For more information, please visit
    https://docs.clarionhealth.com
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.clarionhealth.com/v1
security:
  - bearerAuth: []
paths:
  /patient/match:
    post:
      description: >-
        Find a patient at the practice from identifying details.


        Which fields are required depends on the practice's match rules. If the
        request doesn't have enough fields, the response has `status:
        "insufficient-information"` and lists the fields each rule needs.


        On `status: "matched"`, `patient.patient_id` is the ID to pass to `GET
        /patient/{id}/chart`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                first_name:
                  type: string
                  description: Patient's first name
                  example: Jane
                last_name:
                  type: string
                  description: Patient's last name
                  example: Doe
                date_of_birth:
                  type: string
                  format: date
                  pattern: ^\d{4}-\d{2}-\d{2}$
                  description: Patient's date of birth in YYYY-MM-DD format
                  example: '1990-01-01'
                phone_number:
                  type: string
                  description: >-
                    Patient's phone number. US numbers in any common format are
                    accepted.
                  example: (555) 555-0123
      responses:
        '201':
          description: The match outcome
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientMatchResult'
        '400':
          description: >-
            Invalid request, such as an unknown field or a malformed phone
            number or date
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid phone number
                  error:
                    type: string
                    description: Error code identifying the type of error
                    example: Bad Request
                  statusCode:
                    type: integer
                    description: HTTP status code
                    example: 400
                required:
                  - message
                  - statusCode
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Internal server error
                  statusCode:
                    type: integer
                    description: HTTP status code
                    example: 500
                required:
                  - message
                  - statusCode
components:
  schemas:
    PatientMatchResult:
      description: The outcome of a patient match. Branch on `status`.
      oneOf:
        - type: object
          title: Matched
          description: Exactly one patient matched.
          properties:
            status:
              type: string
              enum:
                - matched
            patient:
              $ref: '#/components/schemas/PatientSearchResult'
            indistinguishable_resolution:
              type: string
              description: >-
                How Clarion handled several records that look like the same
                patient. Present only when more than one record matched equally
                well.
              enum:
                - selected-upcoming
                - undecided-multiple-upcoming
                - selected-past
                - undecided-multiple-past
                - undecided-no-history
                - not-duplicates
                - warning
                - error
          required:
            - status
            - patient
        - type: object
          title: Ambiguous
          description: >-
            Several different patients matched. Send more fields to narrow the
            match.
          properties:
            status:
              type: string
              enum:
                - ambiguous
            candidates:
              type: array
              items:
                $ref: '#/components/schemas/PatientSearchResult'
          required:
            - status
            - candidates
        - type: object
          title: Indistinguishable
          description: >-
            Several records matched that look like the same patient, and Clarion
            could not pick one.
          properties:
            status:
              type: string
              enum:
                - indistinguishable
            candidates:
              type: array
              items:
                $ref: '#/components/schemas/PatientSearchResult'
            indistinguishable_resolution:
              type: string
              description: >-
                How Clarion handled several records that look like the same
                patient. Present only when more than one record matched equally
                well.
              enum:
                - selected-upcoming
                - undecided-multiple-upcoming
                - selected-past
                - undecided-multiple-past
                - undecided-no-history
                - not-duplicates
                - warning
                - error
          required:
            - status
            - candidates
        - type: object
          title: Insufficient information
          description: >-
            The request doesn't include enough fields for any of the practice's
            match rules.
          properties:
            status:
              type: string
              enum:
                - insufficient-information
            missingFields:
              type: array
              description: >-
                For each of the practice's match rules, the fields that rule
                still needs. Supplying every field in any one group makes the
                match possible.
              items:
                type: array
                items:
                  type: string
                  enum:
                    - first_name
                    - last_name
                    - date_of_birth
                    - phone_number
              example:
                - - first_name
                  - last_name
                  - date_of_birth
          required:
            - status
            - missingFields
        - type: object
          title: No match
          description: No patient matched.
          properties:
            status:
              type: string
              enum:
                - no-match
          required:
            - status
    PatientSearchResult:
      type: object
      description: A Clarion patient record returned by a patient match.
      properties:
        patient_id:
          type: integer
          description: Clarion's ID for the patient. Use it with `GET /patient/{id}/chart`.
          example: 12345
        confidence:
          type: number
          nullable: true
          description: Overall match confidence, from 0 to 100
          example: 100
        scores:
          type: object
          nullable: true
          additionalProperties: true
          description: Per-field match scores
        scored_fields:
          type: object
          nullable: true
          additionalProperties: true
          description: The fields that contributed to the match score
        first_name:
          type: string
          nullable: true
          description: Patient's first name
          example: Jane
        secondary_first_name:
          type: string
          nullable: true
          description: Patient's preferred or alternate first name
        last_name:
          type: string
          nullable: true
          description: Patient's last name
          example: Doe
        mrn:
          type: string
          nullable: true
          description: Patient's medical record number in the practice's EHR
          example: MRN-001
        date_of_birth:
          type: string
          format: date
          nullable: true
          description: Patient's date of birth in YYYY-MM-DD format
          example: '1990-01-01'
        cell_number:
          type: string
          nullable: true
          description: Patient's cell phone number in E.164 format
          example: '+15555550123'
        home_number:
          type: string
          nullable: true
          description: Patient's home phone number in E.164 format
        work_number:
          type: string
          nullable: true
          description: Patient's work phone number in E.164 format
        last_called_from_number:
          type: string
          nullable: true
          description: The number the patient last called Clarion from, in E.164 format
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.