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

# Create Encounter Summary

> 
# Data Requirements

**Populate all known data**. It is required for processing that as much information as possible is supplied. 

## Overview
Details of a patient encounter. These details are used to generate an Encounter Summary (Progress Note) CCDA document.
Each encounter with a patient should generate a request to this endpoint.



## OpenAPI

````yaml post /v1/encounter-summary
openapi: 3.0.1
info:
  title: Processing Request API
  description: API for processing of a patient
  termsOfService: https://connectivehealth.io/website-terms-of-use/
  contact:
    name: Connective Health Tech Support
    url: https://connectivehealth.io
    email: techsupport@connectivehealth.io
  version: 3.23.0
servers:
  - url: https://processing-request-staging.connectivehealth.io/
    description: Customer testing site. Test data only. No PHI.
  - url: https://processing-request-production.connectivehealth.io/
    description: Customer production site. Real patient information is only supported here.
security:
  - apiKey: []
paths:
  /v1/encounter-summary:
    post:
      tags:
        - Patient Data Sharing
      summary: Create Encounter Summary
      description: >-

        # Data Requirements


        **Populate all known data**. It is required for processing that as much
        information as possible is supplied. 


        ## Overview

        Details of a patient encounter. These details are used to generate an
        Encounter Summary (Progress Note) CCDA document.

        Each encounter with a patient should generate a request to this
        endpoint.
      operationId: processEncounterSummary
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EncounterSummaryDetails'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProcessingResponse'
        '400':
          description: Validation problems
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Missing or invalid apikey
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProcessingResponse'
        '403':
          description: Missing permission
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProcessingResponse'
components:
  schemas:
    EncounterSummaryDetails:
      required:
        - encounter
        - facility
        - patient
        - provider
      type: object
      properties:
        patient:
          $ref: '#/components/schemas/Patient'
        provider:
          description: Main provider for the encounter
          allOf:
            - $ref: '#/components/schemas/Provider'
        facility:
          description: Facility where this encounter took place
          allOf:
            - $ref: '#/components/schemas/Facility'
        encounter:
          description: Completed encounter by a provider with a patient
          allOf:
            - $ref: '#/components/schemas/Encounter'
        clinicalMessageRecipients:
          maxItems: 10
          type: array
          description: >-
            Recipients who should receive a copy of the generated encounter
            summary
          items:
            $ref: '#/components/schemas/ClinicalMessageRecipient'
        shareableWithClinicalNetworks:
          type: boolean
          description: >-
            Should share this encounter in response to clinical network
            requests. Does not affect internal delivery via direct message, etc.
          default: true
      description: Full details of an encounter
    ProcessingResponse:
      type: object
      properties:
        correlationId:
          type: string
          description: >-
            Unique Connective Health identifier to correlate subsequent
            processing or troubleshooting
          example: 9e923da0-f3cb-4d2b-9fbb-17417104ffd0
    JsonError:
      required:
        - message
      type: object
      allOf:
        - $ref: '#/components/schemas/AbstractResource_JsonError_'
        - type: object
          properties:
            message:
              type: string
            logref:
              $ref: '#/components/schemas/JsonError'
            path:
              $ref: '#/components/schemas/JsonError'
            _links:
              $ref: '#/components/schemas/OptionalMultiValues_Link_'
            _embedded:
              $ref: '#/components/schemas/OptionalMultiValues_Resource_'
    Patient:
      required:
        - address
        - birthDate
        - gender
        - mrn
        - name
      type: object
      properties:
        mrn:
          description: >-
            Patient's Medical Record Number. Populated with the clinic HL7 OID
            home community ID and the local patient ID. Must be unique per
            patient
          allOf:
            - $ref: '#/components/schemas/PatientIdentifier'
        name:
          $ref: '#/components/schemas/Name'
        gender:
          $ref: '#/components/schemas/Gender'
        birthDate:
          type: string
          description: Birth date of the patient in ISO-8601 format yyyy-MM-dd
          format: date
          example: '1992-04-09'
        address:
          $ref: '#/components/schemas/Address'
        contactPoints:
          type: array
          items:
            $ref: '#/components/schemas/ContactPoint'
      description: Patient to be processed
    Provider:
      required:
        - name
        - npi
      type: object
      properties:
        npi:
          maxLength: 10
          minLength: 10
          type: string
          description: NPI value
          example: '1414912117'
          x-size-message: NPI must be exactly 10 characters
        name:
          $ref: '#/components/schemas/Name'
      description: A medical provider
    Facility:
      required:
        - name
      type: object
      properties:
        name:
          minLength: 1
          type: string
          description: Facility Name
          example: ABC Clinic
        address:
          description: Facility Address
          allOf:
            - $ref: '#/components/schemas/Address'
      description: Facility where the medication was prescribed
    Encounter:
      required:
        - careSetting
        - id
        - period
        - type
      type: object
      properties:
        id:
          minLength: 1
          type: string
          description: >-
            Unique ID for this particular encounter. This value to deduplicate
            encounters if necessary
          example: 09b21748-39f6-4c9b-9649-8d7642a19f0f
        period:
          description: >-
            Period of time this encounter took place. If end date is not
            specified then it will be defaulted to the start date
          allOf:
            - $ref: '#/components/schemas/Period'
        careSetting:
          description: Classification for where the care took place
          example: AMBULATORY
          allOf:
            - $ref: '#/components/schemas/CareSetting'
        type:
          description: >-
            Type of the encounter. Should come from
            https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.88.12.80.32/expansion
          example:
            code: '99204'
            codeSystem: 2.16.840.1.113883.6.12
            codeSystemName: CPT
            displayName: OFFICE/OUTPATIENT NEW MODERATE MDM 45 MINUTES
          allOf:
            - $ref: '#/components/schemas/FullyValidatedCode'
        diagnoses:
          type: array
          description: >-
            Diagnoses determined at the encounter. Should be ICD10 or SNOMED
            codes.
          example:
            - code: E11.9
              codeSystem: 2.16.840.1.113883.6.90
              codeSystemName: ICD10
              displayName: Type 2 diabetes mellitus without complications
          items:
            $ref: '#/components/schemas/FullyValidatedCode'
        clinicalNote:
          description: Additional information provided about the encounter
          allOf:
            - $ref: '#/components/schemas/ClinicalNote'
      description: Completed encounter by a provider with a patient
    ClinicalMessageRecipient:
      required:
        - directAddress
      type: object
      properties:
        directAddress:
          minLength: 1
          type: string
          description: >-
            Clinical message recipient address. Should be formatted like an
            email.
          format: email
          example: john.smith@connectivehealth.direct-ci.com
        friendlyName:
          type: string
          description: Human readable version of the recipient.
          example: Dr. John Smith
    AbstractResource_JsonError_:
      type: object
      properties:
        _links:
          $ref: '#/components/schemas/OptionalMultiValues_Link_'
        _embedded:
          $ref: '#/components/schemas/OptionalMultiValues_Resource_'
    OptionalMultiValues_Link_:
      $ref: '#/components/schemas/OptionalValues_List_Link__'
    OptionalMultiValues_Resource_:
      $ref: '#/components/schemas/OptionalValues_List_Resource__'
    PatientIdentifier:
      required:
        - extension
        - root
      type: object
      properties:
        root:
          minLength: 1
          type: string
          description: Identifier's root, generally an OID
          example: 1.2.3.4
        extension:
          minLength: 1
          pattern: '[^()<>"%;+@]*$'
          type: string
          description: Identifier value or extension
          example: ABC123
          x-pattern-message: Should not contain special characters
      description: >-
        Patient's Medical Record Number. Populated with the clinic HL7 OID home
        community ID and the local patient ID. Must be unique per patient
    Name:
      required:
        - family
        - given
      type: object
      properties:
        family:
          minLength: 1
          pattern: '[^<>"%;+@]*$'
          type: string
          description: Family name (last name)
          example: Johnson
          x-pattern-message: Should not contain special characters
        given:
          pattern: '[^<>"%;+@]*$'
          minItems: 1
          type: array
          description: First and middle names. First name (at least) is required
          items:
            pattern: '[^<>"%;+@]*$'
            type: string
            x-pattern-message: Should not contain special characters
        prefix:
          pattern: '[^<>"%;+@]*$'
          type: string
          description: Name prefix
          example: Mr.
          x-pattern-message: Should not contain special characters
        suffix:
          pattern: '[^<>"%;+@]*$'
          type: string
          description: Name suffix
          example: Jr.
          x-pattern-message: Should not contain special characters
      example:
        family: Johnson
        given:
          - John
          - Aaron
        prefix: Mr.
        suffix: Jr.
    Gender:
      type: string
      enum:
        - MALE
        - FEMALE
        - OTHER
        - UNKNOWN
    Address:
      required:
        - zip
      type: object
      properties:
        lines:
          pattern: '[^<>"%;+@]*$'
          type: array
          description: Street lines of the address
          items:
            pattern: '[^<>"%;+@]*$'
            type: string
            x-pattern-message: Should not contain special characters
        city:
          pattern: '[^<>"%;+@]*$'
          type: string
          description: The city
          example: Minneapolis
          x-pattern-message: Should not contain special characters
        state:
          pattern: ^[A-Za-z]{2}$|\s*
          type: string
          description: State code abbreviation
          example: MN
          x-pattern-message: State code must be two character postal abbreviation or blank
        zip:
          pattern: ^(?!^00000$)\d{5}$
          type: string
          description: 5-digit zip code
          example: '55401'
          x-pattern-message: Zip must be a valid five-digit postal code
          x-not-null-message: Zip must not be null
      example:
        lines:
          - 123 Main St
          - Suite 517
        city: Minneapolis
        state: MN
        zip: '55401'
    ContactPoint:
      required:
        - contactPointSystem
        - contactPointUse
        - value
      type: object
      properties:
        value:
          minLength: 1
          type: string
          description: Phone number or email address
          example: '9525551234'
        contactPointSystem:
          description: Type of contact
          example: PHONE
          allOf:
            - $ref: '#/components/schemas/ContactPointSystem'
        contactPointUse:
          description: Use for the contact
          example: HOME
          allOf:
            - $ref: '#/components/schemas/ContactPointUse'
    Period:
      required:
        - startDate
      type: object
      properties:
        startDate:
          type: string
          description: Beginning of the period, inclusive
          format: date
          example: '2022-12-12'
        endDate:
          type: string
          description: End of the period, inclusive
          format: date
          example: '2022-12-14'
      description: >-
        Period of time this encounter took place. If end date is not specified
        then it will be defaulted to the start date
    CareSetting:
      type: string
      description: Classification for where the care took place
      example: AMBULATORY
      enum:
        - AMBULATORY
        - EMERGENCY
        - FIELD
        - HOME_HEALTH
        - INPATIENT
        - VIRTUAL
    FullyValidatedCode:
      required:
        - code
        - codeSystem
        - codeSystemName
        - displayName
      type: object
      properties:
        code:
          minLength: 1
          pattern: '[^<>"%;+@]*$'
          type: string
          description: The specific code from a code system
          example: N0000175497
          x-pattern-message: Should not contain special characters
        codeSystem:
          minLength: 1
          pattern: '[^<>"%;+@]*$'
          type: string
          description: Code system OID. Must be populated if known
          example: 2.16.840.1.113883.6.345
          x-pattern-message: Should not contain special characters
        codeSystemName:
          minLength: 1
          pattern: '[^<>"%;+@]*$'
          type: string
          description: Human-readable name of the code system name if known
          example: MED-RT
          x-pattern-message: Should not contain special characters
        displayName:
          minLength: 1
          type: string
          description: Human-readable description of the code
          example: Penicillin-class Antibacterial
      description: >-
        Type of note content. Should come from
        https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.11.20.9.68/expansion/Latest
      example:
        code: 11506-3
        codeSystem: 2.16.840.1.113883.6.1
        codeSystemName: LOINC
        displayName: Progress Note
    ClinicalNote:
      required:
        - lines
      type: object
      properties:
        author:
          $ref: '#/components/schemas/Provider'
        date:
          type: string
          description: Date the note was recorded or written.
          format: date
          example: '2022-12-12'
        code:
          description: >-
            Type of note content. Should come from
            https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.11.20.9.68/expansion/Latest
          example:
            code: 11506-3
            codeSystem: 2.16.840.1.113883.6.1
            codeSystemName: LOINC
            displayName: Progress Note
          allOf:
            - $ref: '#/components/schemas/FullyValidatedCode'
        lines:
          minItems: 1
          type: array
          description: >-
            text of the clinical note, each line will be distinctly separated on
            CCDA output
          example:
            - The patient was pleasant
            - Recommend following up in 2 weeks
          items:
            minLength: 1
            type: string
    OptionalValues_List_Link__:
      type: object
      properties:
        empty:
          type: boolean
    OptionalValues_List_Resource__:
      type: object
      properties:
        empty:
          type: boolean
    ContactPointSystem:
      type: string
      description: Type of contact
      example: PHONE
      enum:
        - PHONE
        - EMAIL
    ContactPointUse:
      type: string
      description: Use for the contact
      example: HOME
      enum:
        - HOME
        - WORK
        - MOBILE
  securitySchemes:
    apiKey:
      type: apiKey
      description: API Key
      name: apiKey
      in: header

````