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.24.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: "\n# Data Requirements\n\n**Populate all known data**. It is required\
        \ for processing that as much information as possible is supplied. \n\n##\
        \ Overview\nDetails of a patient encounter. These details are used to generate\
        \ an Encounter Summary (Progress Note) CCDA document.\nEach 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"
  /v1/medication-history/load-file:
    post:
      tags:
        - Medication History
      summary: Bulk Patient Panel File Load
      description: |-
        Submits a file of patient demographics which will be submitted for processing of medication history information in a batch manner.
                    File must conform to the Surescripts Medication History Patient Panel Load Format. The file must be a ZIP, GZIP, or BZIP2 type file with a single file within the compressed archive.
      operationId: processMedicationHistoryLoadFile
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
            encoding:
              file:
                contentType: application/octet-stream
                explode: false
        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"
  /v1/medication-history/patient-panel:
    post:
      tags:
        - Medication History
      summary: Patient Panel Load
      description: "\n# Data Requirements\n\n**Populate all known data**. It is required\
        \ for processing that as much information as possible is supplied.\n\n## Early\
        \ Access\n\nNote, this API is still in early access and is subject to change.\
        \ \n \n## Overview\nSubmits a panel of patients for batch processing of medication\
        \ history information.\n\n## Special Validations\n1. Patient names must have\
        \ two or more name components that each have two or more characters\n1. Patient\
        \ address city must be either empty or two or more characters\n1. Patient\
        \ address state must be either empty or two or more characters\n\n## Special\
        \ Processing Rules\n1. Data may be truncated when submitted for downstream\
        \ system processing based on third-party requirements\n1. Only ASCII values\
        \ 32-126 are allowed for downstream processing; all accented characters will\
        \ be replaced with non-accented characters\n"
      operationId: processMedicationHistoryPatientPanel
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MedHistoryPatientPanel"
        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"
  /v1/medication-history/patient-panel/validate:
    post:
      tags:
        - Medication History
      summary: Validate Patient Panel Load
      description: Validates the request without doing any processing
      operationId: validate
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MedHistoryPatientPanel"
        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"
  /v1/patient-panel:
    post:
      tags:
        - ADT Patient Panel
      summary: Panel Registration
      description: "\n# Data Requirements\n\n**Populate all known data**. It is required\
        \ for processing that as much information as possible is supplied.\n \nAll\
        \ active clinical information for a patient should be supplied in every API\
        \ request. \nThat information is used to satisfy reciprocity requirements\
        \ of the various health information exchanges \nthat Connective Health participates\
        \ in. Failure to populate known clinical information for a patient is \na\
        \ violation of health information exchange reciprocity rules, and may result\
        \ in the termination of information exchange.\n\n## Overview\nManage a patient's\
        \ registration on the Patient Panel for ADT monitoring. If an ADT notification\
        \ event occurs, the patient will be processed."
      operationId: processAdtPanelPatient
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AdtPanelPatient"
        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"
  /v1/scheduled-appointment:
    post:
      tags:
        - Scheduled Appointments
      summary: Patient Data Processing
      description: "\n# Data Requirements\n\n**Populate all known data**. It is required\
        \ for processing that as much information as possible is supplied.\n \nAll\
        \ active clinical information for a patient should be supplied in every API\
        \ request. \nThat information is used to satisfy reciprocity requirements\
        \ of the various health information exchanges \nthat Connective Health participates\
        \ in. Failure to populate known clinical information for a patient is \na\
        \ violation of health information exchange reciprocity rules, and may result\
        \ in the termination of information exchange.\n\n## Overview\nStandard processing\
        \ for clinical patient information, both summarized and complete information\
        \ is supported."
      operationId: createScheduledAppointment
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ScheduledAppointment"
        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"
  /v2/patient-data/process:
    post:
      tags:
        - Patient Processing Panel
      summary: Patient Processing Panel
      description: |2-

        # Data Requirements

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

        All active clinical information for a patient should be supplied in every API request.
        That information is used to satisfy reciprocity requirements of the various health information exchanges
        that Connective Health participates in. Failure to populate known clinical information for a patient is
        a violation of health information exchange reciprocity rules, and may result in the termination of information exchange.

        ## Overview
        Standard processing for clinical patient information, both summarized and complete information is supported.
      operationId: processPatientProcessingPanel
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PatientProcessingPanel"
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PatientProcessingPanelResponse"
        "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/PatientProcessingPanelResponse"
        "403":
          description: Missing permission
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PatientProcessingPanelResponse"
  /v2/patient-data/validate:
    post:
      tags:
        - Patient Processing Panel
      summary: Validate Patient Processing Panel
      description: Validates the request without doing any processing
      operationId: validPatientProcessingPanel
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PatientProcessingPanel"
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PatientProcessingPanelResponse"
        "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/PatientProcessingPanelResponse"
  /v2/patient-record:
    post:
      tags:
        - Patient Data Sharing
      summary: Share Patient Record
      description: |2-

        # Data Requirements

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

        All active clinical information for a patient should be supplied in every API request.
        That information is used to satisfy reciprocity requirements of the various health information exchanges
        that Connective Health participates in. Failure to populate known clinical information for a patient is
        a violation of health information exchange reciprocity rules, and may result in the termination of information exchange.

        ## Overview
        Clinical patient record to share with other providers on the network. This record will ONLY be shared if the patient has ALREADY been the subject of a patient search due to either a scheduled appointment or an incoming ADT event.
      operationId: sharePatientRecord
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PatientRecord"
        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:
    AbstractResource_JsonError_:
      type: object
      properties:
        _links:
          $ref: "#/components/schemas/OptionalMultiValues_Link_"
        _embedded:
          $ref: "#/components/schemas/OptionalMultiValues_Resource_"
    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"
    AdtCode:
      type: object
      properties:
        code:
          type: string
          description: The specific code from a code system
          example: N0000175497
        codeSystem:
          type: string
          description: Code system OID. Must be populated if known
          example: 2.16.840.1.113883.6.345
        codeSystemName:
          type: string
          description: Human-readable name of the code system name if known
          example: MED-RT
        displayName:
          type: string
          description: Human-readable description of the code
          example: Penicillin-class Antibacterial
      description: Admit reason from PV2.3
      example:
        displayName: Stomach ache
      externalDocs:
        description: See PV2 segment
        url: https://hl7-definition.caristix.com/v2/HL7v2.5.1/Segments/PV2
    AdtEvent:
      required:
        - classification
        - eventType
        - messageId
        - sendingFacilityName
        - timestamp
      type: object
      properties:
        classification:
          description: Reason why this event is included on request
          example: MAIN
          allOf:
            - $ref: "#/components/schemas/AdtEventClassification"
        messageId:
          minLength: 1
          type: string
          description: Message Control ID from MSH.10
          example: "5125745967"
          externalDocs:
            description: See MSH segment
            url: https://hl7-definition.caristix.com/v2/HL7v2.5.1/Segments/MSH
        eventType:
          description: "ADT event type, generally from MSH.9.2 (EVN.1 in older messages)"
          example: A03
          externalDocs:
            description: See MSH segment
            url: https://hl7-definition.caristix.com/v2/HL7v2.5.1/Segments/MSH
          allOf:
            - $ref: "#/components/schemas/AdtEventType"
        sendingFacilityName:
          minLength: 1
          type: string
          description: "Name of the facility that sent the ADT, generally mapped from\
            \ MSH.4; very important for matching admit/discharge pairs"
          example: First Memorial Hospital
          externalDocs:
            description: See MSH segment
            url: https://hl7-definition.caristix.com/v2/HL7v2.5.1/Segments/MSH
        timestamp:
          type: string
          description: Timestamp when this ADT event was received/processed; used
            to help establish chronological order of incoming events
          format: date-time
          example: 2024-11-01T20:25:16.907342Z
          externalDocs:
            description: See EVN segment
            url: https://hl7-definition.caristix.com/v2/HL7v2.5.1/Segments/EVN
        sendingFacilityPatientId:
          description: "Sending facility's ID for the patient, helpful to provider\
            \ in case of follow-up contact, generally from PID.2, PID.3, or PID.4"
          example:
            root: 2.16.840.1.113883.3.9359.0
            extension: FMH-12345
          externalDocs:
            description: See PID segment
            url: https://hl7-definition.caristix.com/v2/HL7v2.5.1/Segments/PID
          allOf:
            - $ref: "#/components/schemas/AdtIdentifier"
        patientClass:
          type: string
          description: Patient class from PV1.2
          example: E
          externalDocs:
            description: See PV1 segment
            url: https://hl7-definition.caristix.com/v2/HL7v2.5.1/Segments/PV1
        visitNumber:
          description: Visit number from PV1.19
          example:
            root: FirstMemHosp
            extension: "987654321"
          externalDocs:
            description: See PV1 segment
            url: https://hl7-definition.caristix.com/v2/HL7v2.5.1/Segments/PV1
          allOf:
            - $ref: "#/components/schemas/AdtIdentifier"
        admitDate:
          type: string
          description: Date portion of admit timestamp from PV1.44
          format: date
          example: "2024-10-31"
          externalDocs:
            description: See PV1 segment
            url: https://hl7-definition.caristix.com/v2/HL7v2.5.1/Segments/PV1
        dischargeDate:
          type: string
          description: Date portion of (first) discharge timestamp from PV1.45
          format: date
          example: "2024-11-01"
          externalDocs:
            description: See PV1 segment
            url: https://hl7-definition.caristix.com/v2/HL7v2.5.1/Segments/PV1
        dischargeDisposition:
          type: string
          description: Discharge disposition from PV1.36
          example: "02"
          externalDocs:
            description: See PV1 segment
            url: https://hl7-definition.caristix.com/v2/HL7v2.5.1/Segments/PV1
        dischargedToLocation:
          type: string
          description: Discharged to location from PV1.37
          example: Home
          externalDocs:
            description: See PV1 segment
            url: https://hl7-definition.caristix.com/v2/HL7v2.5.1/Segments/PV1
        admitReason:
          description: Admit reason from PV2.3
          example:
            displayName: Stomach ache
          externalDocs:
            description: See PV2 segment
            url: https://hl7-definition.caristix.com/v2/HL7v2.5.1/Segments/PV2
          allOf:
            - $ref: "#/components/schemas/AdtCode"
        diagnoses:
          maxItems: 500
          minItems: 0
          type: array
          description: "Diagnoses, one for each DG1 segment; any diagnosis without\
            \ a valid ICD-10 code is ignored"
          example:
            - code: R10.13
              codeSystem: I10
              type: Final
          externalDocs:
            description: See DG1 segment
            url: https://hl7-definition.caristix.com/v2/HL7v2.5.1/Segments/DG1
          items:
            $ref: "#/components/schemas/AdtEventDiagnosis"
    AdtEventClassification:
      type: string
      description: "MAIN: This ADT is a main reason for the current request \nSUPPLEMENTAL:\
        \ This ADT is not directly related to the current request, but provides additional\
        \ potentially useful patient data"
      example: MAIN
      enum:
        - MAIN
        - SUPPLEMENTAL
    AdtEventData:
      type: object
      properties:
        adtEvents:
          maxItems: 300
          minItems: 1
          type: array
          description: "ADT events for the patient, at least one of which should have\
            \ classification of MAIN"
          items:
            $ref: "#/components/schemas/AdtEvent"
      description: ADT event information about the patient; populating this field
        requires ADT feature authorization enabled on customer account
    AdtEventDiagnosis:
      required:
        - code
      type: object
      properties:
        code:
          minLength: 1
          type: string
          description: Diagnosis Code Identifier from DG1.3.1
          example: R10.13
          externalDocs:
            description: See DG1 segment
            url: https://hl7-definition.caristix.com/v2/HL7v2.5.1/Segments/DG1
        codeSystem:
          type: string
          description: Diagnosis Code System from DG1.3.3
          example: I10
          externalDocs:
            description: See DG1 segment
            url: https://hl7-definition.caristix.com/v2/HL7v2.5.1/Segments/DG1
        type:
          type: string
          description: Diagnosis Type from DG1.6
          example: Final
          externalDocs:
            description: See DG1 segment
            url: https://hl7-definition.caristix.com/v2/HL7v2.5.1/Segments/DG1
    AdtEventType:
      type: string
      description: Supported ADT Event Types
      example: A03
      externalDocs:
        description: See Event Types
        url: https://hl7-definition.caristix.com/v2/HL7v2.5.1/Tables/0003
      enum:
        - A01
        - A02
        - A03
        - A04
        - A05
        - A06
        - A07
        - A08
        - A09
        - A10
        - A11
        - A12
        - A13
        - A14
        - A15
        - A16
        - A17
        - A18
        - A19
        - A20
        - A21
        - A22
        - A23
        - A24
        - A25
        - A26
        - A27
        - A28
        - A29
        - A30
        - A31
        - A32
        - A33
        - A34
        - A35
        - A36
        - A37
        - A38
        - A39
        - A40
        - A41
        - A42
        - A43
        - A44
        - A45
        - A46
        - A47
        - A48
        - A49
        - A50
        - A51
        - A52
        - A53
        - A54
        - A55
        - A60
        - A61
        - A62
    AdtIdentifier:
      type: object
      properties:
        root:
          type: string
          description: Identifier's root
          example: ACME_HEALTH
        extension:
          type: string
          description: Identifier value or extension
          example: "123456"
      description: "Sending facility's ID for the patient, helpful to provider in\
        \ case of follow-up contact, generally from PID.2, PID.3, or PID.4"
      example:
        root: 2.16.840.1.113883.3.9359.0
        extension: FMH-12345
      externalDocs:
        description: See PID segment
        url: https://hl7-definition.caristix.com/v2/HL7v2.5.1/Segments/PID
    AdtPanelPatient:
      required:
        - patient
        - provider
      type: object
      properties:
        patient:
          description: "Patient to add to the patient panel. Patients on the panel\
            \ will be monitored via ADT events. If this patient already exists, it\
            \ will be overwritten. Patients are never deleted; to remove a patient\
            \ from the panel, set the endDate appropriately."
          allOf:
            - $ref: "#/components/schemas/Patient"
        startDate:
          type: string
          description: "Date the patient will start being monitored, in ISO-8601 format\
            \ yyyy-MM-dd. Only panels generated on or after this date will include\
            \ this patient. Defaults to current date."
          format: date
          example: "2024-11-05"
        endDate:
          type: string
          description: "Date the patient will stop being monitored, in ISO-8601 format\
            \ yyyy-MM-dd. If not null, only panels generated on or before this date\
            \ will include this patient"
          format: date
          nullable: true
          example: "2025-11-05"
        batchId:
          pattern: "[^<>\"%;+@]*$"
          type: string
          description: Identifier which can be used to logically group requests together.
            Do not populate if you do not need to group requests together. Will default
            to a UUID it not populated
          example: BATCH-123
          x-pattern-message: Should not contain special characters
        provider:
          description: "This will be the requesting provider for medical records required\
            \ to generate a care summary (or FHIR bundle, etc.) as the result of an\
            \ ADT event"
          allOf:
            - $ref: "#/components/schemas/Provider"
        activeIcd10Diagnoses:
          type: array
          description: All active diagnoses (problems) known about the patient. Must
            all be ICD-10 codes. If the patient is an existing patient then this list
            should be populated with all known diagnoses
          items:
            $ref: "#/components/schemas/Diagnosis"
        activeIcd9Diagnoses:
          type: array
          description: All active diagnoses (problems) known about the patient. Must
            all be ICD-9 codes. If the patient is an existing patient then this list
            should be populated with all known diagnoses. **ICD-10 should be greatly
            preferred if available.**
          example:
            - code: "401.1"
              displayName: Benign essential hypertension
              date: "2023-12-12"
          items:
            $ref: "#/components/schemas/Diagnosis"
        activeSnomedDiagnoses:
          type: array
          description: All active diagnoses (problems) known about the patient. Must
            all be SNOMED codes. If the patient is an existing patient then this list
            should be populated with all known diagnoses. **ICD-10 should be greatly
            preferred if available.**
          example:
            - code: "34713006"
              displayName: Vitamin D deficiency
              date: "2023-11-12"
          items:
            $ref: "#/components/schemas/Diagnosis"
        medications:
          type: array
          description: All known medications for the patient
          items:
            $ref: "#/components/schemas/Medication"
        clinicalNotes:
          type: array
          description: Additional information provided about the patient
          items:
            $ref: "#/components/schemas/ClinicalNote"
        consent:
          description: "Whether patient consent has been obtained to register and/or\
            \ share their data them in specific contexts. Some HIEs require consent\
            \ information to register patients. It is important to include non-positive\
            \ consent, as in some cases, those patients may still be eligible to have\
            \ some information shared in emergencies."
          allOf:
            - $ref: "#/components/schemas/Consent"
    BronxRhioConsent:
      required:
        - status
      type: object
      properties:
        status:
          description: Patient's consent status for Bronx RHIO
          allOf:
            - $ref: "#/components/schemas/BronxRhioConsent.Status"
        date:
          type: string
          description: Effective date of patient consent for Bronx RHIO
          format: date
      description: "Patient Consent information for Bronx RHIO, Inc. of New York State."
    BronxRhioConsent.Status:
      type: string
      description: Patient's consent status for Bronx RHIO
      enum:
        - "YES"
        - "NO"
        - UNKNOWN
        - RESET
      x-enum-descriptions:
        - Yes (positive consent)
        - No (negative consent)
        - Unknown (use this if neither YES/NO apply)
        - Reset/Remove (this should generally not be used unless directed by Connective
          Health)
    CareManagementConfiguration:
      type: object
      properties:
        amyotrophicLateralSclerosis:
          description: Amyotrophic Lateral Sclerosis configuration
          allOf:
            - $ref: "#/components/schemas/CareManagementInsight"
        chronicKidneyDisease:
          description: Chronic Kidney Disease configuration
          allOf:
            - $ref: "#/components/schemas/CareManagementInsight"
        chronicObstructivePulmonaryDisease:
          description: Chronic Obstructive Pulmonary Disease configuration
          allOf:
            - $ref: "#/components/schemas/CareManagementInsight"
        cirrhosisOfLiver:
          description: Cirrhosis Of Liver configuration
          allOf:
            - $ref: "#/components/schemas/CareManagementInsight"
        dementia:
          description: Dementia configuration
          allOf:
            - $ref: "#/components/schemas/CareManagementInsight"
        diabetes:
          description: Diabetes configuration
          allOf:
            - $ref: "#/components/schemas/CareManagementInsight"
        heartArrhythmia:
          description: Heart Arrhythmia configuration
          allOf:
            - $ref: "#/components/schemas/CareManagementInsight"
        heartFailure:
          description: Heart Failure configuration
          allOf:
            - $ref: "#/components/schemas/CareManagementInsight"
        majorDepression:
          description: Major Depression configuration
          allOf:
            - $ref: "#/components/schemas/CareManagementInsight"
        parkinsonsDisease:
          description: Parkinson's configuration
          allOf:
            - $ref: "#/components/schemas/CareManagementInsight"
        rheumatoidArthritis:
          description: Rheumatoid Arthritis configuration
          allOf:
          - $ref: "#/components/schemas/CareManagementInsight"
        seizureDisorder:
          description: Seizure Disorders and Convulsions configuration
          allOf:
          - $ref: "#/components/schemas/CareManagementInsight"
        general:
          description: "General configuration. Special configuration for when patient\
            \ has no known conditions that require care management but is, nonetheless,\
            \ a care management patient. Speak with customer success before using\
            \ this feature to understand how this affects processing."
          allOf:
            - $ref: "#/components/schemas/CareManagementInsight"
      description: Care Management configuration. Each condition may be individually
        enabled or disabled. Omitting a condition is the same as disabling it. This
        configuration is only effective for customers with the care management feature
        enabled.
    CareManagementInsight:
      required:
        - enabled
      type: object
      properties:
        enabled:
          type: boolean
          description: Whether this care management insight is enabled for care summary
      description: Individual care management for a condition
    CareSetting:
      type: string
      description: Classification for where the care took place
      example: AMBULATORY
      enum:
        - AMBULATORY
        - EMERGENCY
        - FIELD
        - HOME_HEALTH
        - INPATIENT
        - VIRTUAL
    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
    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
    Code:
      required:
        - displayName
      type: object
      properties:
        code:
          pattern: "[^<>\"%;+@]*$"
          type: string
          description: The specific code from a code system
          example: N0000175497
          x-pattern-message: Should not contain special characters
        codeSystem:
          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:
          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: "A code value within a given code system, along with human-readable\
        \ names"
      example:
        code: "6809"
        codeSystem: 2.16.840.1.113883.6.88
        codeSystemName: RxNorm
        displayName: metFORMIN
    Consent:
      type: object
      properties:
        bronxRhioConsent:
          description: "Patient Consent information for Bronx RHIO, Inc. of New York\
            \ State."
          allOf:
            - $ref: "#/components/schemas/BronxRhioConsent"
      description: "Whether patient consent has been obtained to register and/or share\
        \ their data them in specific contexts. Some HIEs require consent information\
        \ to register patients. It is important to include non-positive consent, as\
        \ in some cases, those patients may still be eligible to have some information\
        \ shared in emergencies."
    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"
    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
    DeliverableDocumentType:
      type: string
      enum:
        - PATIENT_CARE_SUMMARY
        - QUALITY_MEASURES_SUMMARY
    Diagnosis:
      required:
        - code
        - displayName
      type: object
      properties:
        code:
          minLength: 1
          pattern: "[^<>\"%;+@]*$"
          type: string
          description: The diagnosis code including punctuation
          example: E66.01
          x-pattern-message: Should not contain special characters
        displayName:
          minLength: 1
          type: string
          description: The display value for the diagnosis
          example: Morbid (severe) obesity due to excess calories
        date:
          type: string
          description: Date of the problem (onset or diagnosed)
          format: date
          example: "2022-12-12"
    Diagnosis_1:
      required:
        - active
        - code
        - codeSystem
        - displayName
      type: object
      properties:
        code:
          minLength: 1
          pattern: "[^<>\"%;+@]*$"
          type: string
          description: The diagnosis code including punctuation
          example: E66.01
          x-pattern-message: Should not contain special characters
        codeSystem:
          minLength: 1
          pattern: "[^<>\"%;+@]*$"
          type: string
          description: The diagnosis code system - should be an HL7 OID
          example: 2.16.840.1.113883.6.90
          x-pattern-message: Should not contain special characters
        displayName:
          minLength: 1
          type: string
          description: The display value for the diagnosis
          example: Morbid (severe) obesity due to excess calories
        date:
          type: string
          description: Date of the problem (onset or diagnosed)
          format: date
          example: "2022-12-12"
        active:
          type: boolean
          description: Whether the diagnosis is still active or not
          example: true
        diseaseManagement:
          description: Risk adjustment disease management information. This information
            is only applicable for risk adjustment patient processing.
          allOf:
            - $ref: "#/components/schemas/DiseaseManagement"
    DiagnosticCategories:
      type: object
      properties:
        autoimmune:
          type: boolean
          description: Autoimmune diagnostic information is desired for the patient
          example: false
          default: false
        bariatric:
          type: boolean
          description: Bariatric diagnostic information is desired for the patient
          example: false
          default: false
        behavioral:
          type: boolean
          description: Behavioral Health diagnostic information is desired for the
            patient
          example: false
          default: false
        cardiovascular:
          type: boolean
          description: Cardiovascular diagnostic information is desired for the patient
          example: false
          default: false
        dental:
          type: boolean
          description: Dental diagnostic information is desired for the patient
          example: false
          default: false
        dermatological:
          type: boolean
          description: Dermatological/Integumentary diagnostic information is desired
            for the patient
          example: false
          default: false
        endocrinological:
          type: boolean
          description: Endocrinological diagnostic information is desired for the
            patient
          example: false
          default: false
        gastroenterological:
          type: boolean
          description: Gastroenterological/Gastrointestinal/Hepatobiliary diagnostic
            information is desired for the patient
          example: false
          default: false
        generalInformation:
          type: boolean
          description: General diagnostic information is desired for the patient;
            use in conjunction with medicalSummaryPeriod to limit the data normally
            returned
          example: false
          default: false
        generalSurgery:
          type: boolean
          description: General Surgery diagnostic information is desired for the patient
          example: false
          default: false
        hematological:
          type: boolean
          description: Hematological diagnostic information is desired for the patient
          example: false
          default: false
        infectious:
          type: boolean
          description: Infectious disease diagnostic information is desired for the
            patient
          example: false
          default: false
        lymphatic:
          type: boolean
          description: Lymphatic diagnostic information is desired for the patient
          example: false
          default: false
        mens:
          type: boolean
          description: Men's Health diagnostic information is desired for the patient
          example: false
          default: false
        metabolic:
          type: boolean
          description: Metabolic diagnostic information is desired for the patient
          example: false
          default: false
        musculoskeletal:
          type: boolean
          description: Musculoskeletal diagnostic information is desired for the patient
          example: false
          default: false
        neonatological:
          type: boolean
          description: Neonatological diagnostic information is desired for the patient
          example: false
          default: false
        neurological:
          type: boolean
          description: Neurological diagnostic information is desired for the patient
          example: false
          default: false
        nutritional:
          type: boolean
          description: Nutritional diagnostic information is desired for the patient
          example: false
          default: false
        oncological:
          type: boolean
          description: Oncological diagnostic information is desired for the patient
          example: false
          default: false
        ophthalmic:
          type: boolean
          description: Ophthalmic diagnostic information is desired for the patient
          example: false
          default: false
        otolaryngological:
          type: boolean
          description: Otolaryngological diagnostic information is desired for the
            patient
          example: false
          default: false
        pain:
          type: boolean
          description: Chronic pain-related diagnostic information is desired for
            the patient
          example: false
          default: false
        postSurgery:
          type: boolean
          description: Post-surgery diagnostic information is desired for the patient
          example: false
          default: false
        pulmonary:
          type: boolean
          description: Pulmonary diagnostic information is desired for the patient
          example: false
          default: false
        renal:
          type: boolean
          description: Renal diagnostic information is desired for the patient
          example: false
          default: false
        spinal:
          type: boolean
          description: Spinal diagnostic information is desired for the patient
          example: false
          default: false
        stroke:
          type: boolean
          description: Stroke diagnostic information is desired for the patient
          example: false
          default: false
        toxicological:
          type: boolean
          description: Toxicological diagnostic information is desired for the patient
          example: false
          default: false
        urological:
          type: boolean
          description: Urological diagnostic information is desired for the patient
          example: false
          default: false
        womens:
          type: boolean
          description: Women's Health diagnostic information is desired for the patient
          example: false
          default: false
      description: Diagnostic categories of interest regarding the patient
    Directives:
      type: object
      properties:
        newPatient:
          type: boolean
          description: Whether patient is new to the clinic (first time patient)
          example: false
          default: false
        diagnosticCategories:
          description: Diagnostic categories of interest regarding the patient
          allOf:
            - $ref: "#/components/schemas/DiagnosticCategories"
        medicationsOfInterest:
          type: array
          description: "Medications of interest regarding the patient. Include MedicationRequest\
            \ details if known. \nThese may be displayed on documents to direct the\
            \ reader's attention.\n\n**For medication filtering to work correctly**,\
            \ medication request codes must be 11-digit NDCs. Therefore the code system\
            \ must be \neither http://hl7.org/fhir/sid/ndc (the NDC URI) or 2.16.840.1.113883.6.69\
            \ (the NDC OID), and the code value must be an 11-digit NDC,\nwith or\
            \ without dashes."
          items:
            $ref: "#/components/schemas/Medication"
        riskAdjustmentConfiguration:
          description: "Chronic conditions (Risk adjustment) configuration options.\
            \ If omitted, defaults to the customer default configuration."
          allOf:
            - $ref: "#/components/schemas/RiskAdjustmentConfiguration"
        careManagementConfiguration:
          description: "Care management configuration options. If omitted, defaults\
            \ to the customer default configuration."
          allOf:
            - $ref: "#/components/schemas/CareManagementConfiguration"
        qualityMeasureConfiguration:
          description: "Quality measure configuration options. If omitted, defaults\
            \ to the customer default configuration."
          allOf:
            - $ref: "#/components/schemas/QualityMeasureConfiguration"
        medicalSummaryPeriod:
          description: "Processing hint which influences the inclusive date range\
            \ for data returned on the medical summary. If this is used, at least\
            \ one diagnostic category must also be enabled."
          allOf:
            - $ref: "#/components/schemas/Period"
      description: Directives which may influence how the data is processed
    Directives_1:
      type: object
      properties:
        newPatient:
          type: boolean
          description: Whether patient is new to the clinic (first time patient)
          example: false
          default: false
        diagnosticCategories:
          description: Diagnostic categories of interest regarding the patient
          allOf:
            - $ref: "#/components/schemas/DiagnosticCategories"
        medicationsOfInterest:
          type: array
          description: "Medications of interest regarding the patient. Include MedicationRequest\
            \ details if known. \nThese may be displayed on documents to direct the\
            \ reader's attention.\n\n**For medication filtering to work correctly**,\
            \ medication request codes must be 11-digit NDCs. Therefore the code system\
            \ must be \neither http://hl7.org/fhir/sid/ndc (the NDC URI) or 2.16.840.1.113883.6.69\
            \ (the NDC OID), and the code value must be an 11-digit NDC,\nwith or\
            \ without dashes."
          items:
            $ref: "#/components/schemas/Medication"
      description: Directives which may influence how the data is processed
    DiseaseManagement:
      required:
        - details
      type: object
      properties:
        details:
          maxItems: 10
          minItems: 1
          type: array
          items:
            $ref: "#/components/schemas/DiseaseManagementDetail"
      description: Risk adjustment disease management information. This information
        is only applicable for risk adjustment patient processing.
    DiseaseManagementDetail:
      required:
        - addressedDate
      type: object
      properties:
        addressedDate:
          type: string
          description: The date when the provider documented/addressed the diagnosis
            for the given year
          format: date
          example: "2023-08-15"
        provider:
          description: Provider who documented the recapture
          allOf:
            - $ref: "#/components/schemas/Provider"
        facility:
          description: Facility or clinic where the recapture was performed
          allOf:
            - $ref: "#/components/schemas/Facility"
    Dosage:
      type: object
      properties:
        text:
          type: string
          description: "Prescriber's sig, or directions for taking the medication"
          example: take 1 tablet by mouth once daily
        strengthUnit:
          pattern: "[^<>\"%;+@]*$"
          type: string
          description: Unit of the dosage strength
          example: mg
          x-pattern-message: Should not contain special characters
        strengthValue:
          type: number
          description: Value of the dosage strength
          format: double
          example: 100
        amountUnit:
          pattern: "[^<>\"%;+@]*$"
          type: string
          description: Unit of a single dose
          example: puffs
          x-pattern-message: Should not contain special characters
        amountValue:
          type: number
          description: Value of a single dose
          format: double
          example: 2
    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
    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
    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
    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
    Gender:
      type: string
      enum:
        - MALE
        - FEMALE
        - OTHER
        - UNKNOWN
    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_"
    MedHistoryPatientPanel:
      required:
        - medHistoryPatientRecords
      type: object
      properties:
        medHistoryPatientRecords:
          maxItems: 5000
          minItems: 1
          type: array
          items:
            $ref: "#/components/schemas/MedHistoryPatientRecord"
    MedHistoryPatientRecord:
      required:
        - patient
        - requestingProvider
      type: object
      properties:
        patient:
          $ref: "#/components/schemas/Patient"
        requestingProvider:
          $ref: "#/components/schemas/Provider"
    Medication:
      required:
        - active
        - nameCode
      type: object
      properties:
        active:
          type: boolean
          description: Whether this medication is being actively used by the patient
          example: true
        nameCode:
          description: Medication name code. Code system should be RxNorm if possible
          example:
            code: "6809"
            codeSystem: 2.16.840.1.113883.6.88
            codeSystemName: RxNorm
            displayName: metFORMIN
          allOf:
            - $ref: "#/components/schemas/Code"
        classCode:
          description: Medication class code. Code system should be MED-RT if possible
          example:
            code: N0000175565
            codeSystem: 2.16.840.1.113883.6.345
            codeSystemName: MED-RT
            displayName: Biguanide
          allOf:
            - $ref: "#/components/schemas/Code"
        scheduleCode:
          description: Medication schedule code.
          example:
            code: IV
            codeSystem: 2.16.840.1.113883.12.477
            codeSystemName: Controlled Substance Schedule
            displayName: Schedule IV
          allOf:
            - $ref: "#/components/schemas/Code"
        medicationRequests:
          type: array
          items:
            $ref: "#/components/schemas/MedicationRequest"
    MedicationRequest:
      type: object
      properties:
        code:
          description: "Medication code. This is the specific medication including\
            \ form. Code system should be NDC or RxNorm if possible. NDC codes are\
            \ strongly encouraged to be 11-digit if possible, otherwise 10-digit with\
            \ dashes."
          example:
            code: "861007"
            codeSystem: 2.16.840.1.113883.6.88
            codeSystemName: RxNorm
            displayName: metFORMIN hydrochloride 500 MG Oral Tablet
          allOf:
            - $ref: "#/components/schemas/Code"
        form:
          description: Form the medication is in. Code system should be NCI Thesaurus
            if possible
          example:
            code: C42998
            codeSystem: 2.16.840.1.113883.3.26.1.1
            codeSystemName: NCI Thesaurus
            displayName: tablet
          allOf:
            - $ref: "#/components/schemas/Code"
        route:
          description: Route by which the medication is administered
          example:
            code: C38288
            codeSystem: 2.16.840.1.113883.3.26.1.1
            codeSystemName: NCI Thesaurus
            displayName: oral
          allOf:
            - $ref: "#/components/schemas/Code"
        prescribedDate:
          type: string
          description: "Date the medication was prescribed, in ISO-8601 format yyyy-MM-dd"
          format: date
          example: "2023-12-02"
        prescriber:
          description: Prescriber of the medication
          allOf:
            - $ref: "#/components/schemas/Provider"
        facility:
          description: Facility where the medication was prescribed
          allOf:
            - $ref: "#/components/schemas/Facility"
        initialFillQuantity:
          type: number
          description: Quantity initially filled for the medication
          format: double
          example: 10
        numberOfRefillsAllowed:
          type: integer
          description: Number of refills allowed for this prescription
          format: int32
          example: 0
        timingEvent:
          description: "Timing of medication administration, taken from https://www.hl7.org/fhir/R4/valueset-timing-abbreviation.html\
            \ (OID 2.16.840.1.113883.4.642.3.78). Should be consistent with frequency\
            \ if both populated"
          example: QD
          allOf:
            - $ref: "#/components/schemas/TimingEvent"
        frequencyUnit:
          pattern: "[^<>\"%;+@]*$"
          type: string
          description: Unit of time as defined by http://hl7.org/fhir/ValueSet/units-of-time.
            Should be consistent with timingEvent if both populated
          example: d
          x-pattern-message: Should not contain special characters
        frequencyValue:
          type: number
          description: Frequency at which the medication should be taken. Should be
            consistent with timingEvent if both populated
          format: double
          example: 1
        dosageInstruction:
          $ref: "#/components/schemas/Dosage"
    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.
    OptionalMultiValues_Link_:
      $ref: "#/components/schemas/OptionalValues_List_Link__"
    OptionalMultiValues_Resource_:
      $ref: "#/components/schemas/OptionalValues_List_Resource__"
    OptionalValues_List_Link__:
      type: object
      properties:
        empty:
          type: boolean
    OptionalValues_List_Resource__:
      type: object
      properties:
        empty:
          type: boolean
    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
    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
    PatientPanelDirectives:
      type: object
      properties:
        requestMedicationHistory:
          type: boolean
          description: |-
            Whether pharmacy medication history information should be requested prior to any further processing.
            Note: only a limited number of batches are allowed per day with this flag set to true.
            Make sure patients are batched together in groups.
            Contact your customer success representative for more details on usage of this feature.
          example: true
          default: false
        deliverableDocuments:
          type: array
          description: Created documents to be potentially delivered. Do not populate
            unless overriding the customer defaults is necessary. An empty list means
            no documents should be delivered.
          items:
            $ref: "#/components/schemas/DeliverableDocumentType"
          default:
            - PATIENT_CARE_SUMMARY
            - QUALITY_MEASURES_SUMMARY
        principalOid:
          type: string
          description: OID of the organization which is the principal entity in the
            health care transaction. e.g. 2.16.840.1.113883.3.9359.1
      description: Directives which may influence how the data is processed. Applies
        to all requests in this panel.
    PatientProcessingPanel:
      required:
        - patientProcessingRequests
      type: object
      properties:
        patientProcessingRequests:
          maxItems: 2500
          minItems: 1
          type: array
          items:
            $ref: "#/components/schemas/PatientProcessingRequest"
        batchId:
          pattern: "[^<>\"%;+@]*$"
          type: string
          description: Identifier which can be used to logically group requests together.
            Do not populate if you do not need to group requests together. Will default
            if not populated
          example: BATCH-123
          x-pattern-message: Should not contain special characters
        patientPanelDirectives:
          description: Directives which may influence how the data is processed. Applies
            to all requests in this panel.
          allOf:
            - $ref: "#/components/schemas/PatientPanelDirectives"
    PatientProcessingPanelResponse:
      type: object
      properties:
        correlationId:
          type: string
          description: Unique overall Connective Health identifier to correlate subsequent
            processing or troubleshooting
          example: 10c7b080-76f2-4aff-beeb-a2f7b4ca7a89
        responses:
          type: array
          description: Response details about each individual request in the panel
          items:
            $ref: "#/components/schemas/PatientProcessingResponse"
      example:
        correlationId: 10c7b080-76f2-4aff-beeb-a2f7b4ca7a89
        responses:
          - sequenceNumber: 0
            correlationId: 4b0b3bdc-d007-4274-b1c7-f89fbb2fd775
          - sequenceNumber: 1
            correlationId: e82a9cfb-a6cd-4194-a0fd-9882b3a4e76b
          - sequenceNumber: 2
            correlationId: e5c3310a-6cb4-4755-a5c2-35b99d946181
    PatientProcessingRequest:
      required:
        - patient
        - requestingProvider
      type: object
      properties:
        patient:
          $ref: "#/components/schemas/Patient_1"
        upcomingAppointmentDate:
          type: string
          description: Date of the appointment in ISO-8601 format yyyy-MM-dd
          format: date
          example: "2025-11-05"
        requestingProvider:
          $ref: "#/components/schemas/Provider"
        clinicName:
          pattern: "[^<>\"%;+@]*$"
          type: string
          description: "Name of the clinic the patient is being seen at, or the organization\
            \ requesting the data. Customer name will be used if not populated"
          example: Simple Clinic Name
          x-pattern-message: Should not contain special characters
        clinicNpi:
          maxLength: 10
          minLength: 10
          type: string
          description: Facility's NPI if known
          example: "1414912117"
          x-size-message: NPI must be exactly 10 characters
        responseDirectAddress:
          type: string
          description: "Direct Address to return documents to. Typically, populate\
            \ this OR responseFaxNumber"
          format: email
          example: contact@yourdomain.com
          x-pattern-message: response direct address must be a valid format
        responseFriendlyName:
          pattern: "[^<>\"%;+@]*$"
          type: string
          description: Human-readable name to send response message to
          example: Heart Clinic
          x-pattern-message: Should not contain special characters
        diagnoses:
          type: array
          description: All diagnoses (problems) known about the patient. If the patient
            is an existing patient then this list should be populated with all known
            diagnoses
          items:
            $ref: "#/components/schemas/Diagnosis_1"
        medications:
          type: array
          description: All known medications about the patient
          items:
            $ref: "#/components/schemas/Medication"
        clinicalNotes:
          type: array
          description: Additional information provided about the patient
          items:
            $ref: "#/components/schemas/ClinicalNote"
        adtEventData:
          description: ADT event information about the patient; populating this field
            requires ADT feature authorization enabled on customer account
          allOf:
            - $ref: "#/components/schemas/AdtEventData"
        directives:
          description: Directives which may influence how the data is processed
          allOf:
            - $ref: "#/components/schemas/Directives"
    PatientProcessingResponse:
      type: object
      properties:
        sequenceNumber:
          type: integer
          description: Zero-based sequence number for which element in the original
            request this response is for
          format: int32
          example: 0
        correlationId:
          type: string
          description: Unique Connective Health identifier to correlate subsequent
            processing or troubleshooting
          example: e5c3310a-6cb4-4755-a5c2-35b99d946181
    PatientRecord:
      required:
        - patient
        - responsibleProvider
      type: object
      properties:
        patient:
          $ref: "#/components/schemas/Patient_1"
        responsibleProvider:
          description: "Provider responsible for this patient's care. This can be\
            \ the Primary Care Physician (PCP), most recent provider, or a provider\
            \ assigned for future care."
          allOf:
            - $ref: "#/components/schemas/Provider"
        diagnoses:
          type: array
          description: All diagnoses (problems) known about the patient. If the patient
            is an existing patient then this list should be populated with all known
            diagnoses
          items:
            $ref: "#/components/schemas/Diagnosis_1"
        medications:
          type: array
          description: All known medications about the patient
          items:
            $ref: "#/components/schemas/Medication"
        clinicalNotes:
          type: array
          description: All known clinical notes about the patient which are not related
            to a specific encounter
          items:
            $ref: "#/components/schemas/ClinicalNote"
        batchId:
          pattern: "[^<>\"%;+@]*$"
          type: string
          description: Identifier which can be used to logically group requests together.
            Do not populate if you do not need to group requests together. Will default
            to a UUID if not populated
          example: BATCH-123
          x-pattern-message: Should not contain special characters
    Patient_1:
      required:
        - addresses
        - 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"
        addresses:
          maxItems: 3
          minItems: 1
          type: array
          items:
            $ref: "#/components/schemas/Address"
        contactPoints:
          type: array
          items:
            $ref: "#/components/schemas/ContactPoint"
      description: Patient to be processed
    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
    ProcessingResponse:
      type: object
      properties:
        correlationId:
          type: string
          description: Unique Connective Health identifier to correlate subsequent
            processing or troubleshooting
          example: 9e923da0-f3cb-4d2b-9fbb-17417104ffd0
    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
    QualityMeasure:
      required:
        - enabled
      type: object
      properties:
        enabled:
          type: boolean
          description: Whether the measure is enabled for quality reporting
      description: Individual quality measure
    QualityMeasureConfiguration:
      type: object
      properties:
        asOfDateOverride:
          type: string
          description: "Date to process quality rules for. \nAllows for processing\
            \ rules as if the patient were being processed in a prior year (generally\
            \ the previous year). \nIt is recommended to use December 31st for prior\
            \ years. If specified, this must be either a current or prior year.\n\
            The system default is to simply use current date."
          format: date
          example: "2025-12-31"
        annualWellnessVisit:
          description: Annual Wellness Visit measure configuration
          allOf:
            - $ref: "#/components/schemas/QualityMeasure"
        cardiovascularBloodPressure:
          description: Blood Pressure Control measure configuration
          allOf:
            - $ref: "#/components/schemas/QualityMeasure"
        diabeticBloodPressure:
          description: Blood Pressure Control for Diabetics measure configuration
          allOf:
            - $ref: "#/components/schemas/QualityMeasure"
        diabeticEyeExam:
          description: Diabetic Eye Exam measure configuration
          allOf:
            - $ref: "#/components/schemas/QualityMeasure"
        diabeticHba1c:
          description: Diabetic HbA1c measure configuration
          allOf:
            - $ref: "#/components/schemas/QualityMeasure"
        diabeticKidneyHealth:
          description: Kidney Health measure configuration
          allOf:
            - $ref: "#/components/schemas/QualityMeasure"
        medAdherenceBloodPressure:
          description: Blood Pressure Medications adherence measure configuration
          allOf:
            - $ref: "#/components/schemas/QualityMeasure"
        medAdherenceCholesterol:
          description: Cholesterol Medications adherence measure configuration
          allOf:
            - $ref: "#/components/schemas/QualityMeasure"
        medAdherenceDiabetes:
          description: Diabetes Medications adherence measure configuration
          allOf:
            - $ref: "#/components/schemas/QualityMeasure"
        screeningBreastCancer:
          description: Breast Cancer Screening measure configuration
          allOf:
            - $ref: "#/components/schemas/QualityMeasure"
        screeningCervicalCancer:
          description: Cervical Cancer Screening measure configuration
          allOf:
            - $ref: "#/components/schemas/QualityMeasure"
        screeningColorectal:
          description: Colorectal Screening measure configuration
          allOf:
            - $ref: "#/components/schemas/QualityMeasure"
        screeningDepression:
          description: Depression Screening measure configuration
          allOf:
            - $ref: "#/components/schemas/QualityMeasure"
        vaccineFlu:
          description: Flu Vaccine measure configuration
          allOf:
            - $ref: "#/components/schemas/QualityMeasure"
        screeningTobaccoUse:
          description: Tobacco Use screening measure configuration
          allOf:
            - $ref: "#/components/schemas/QualityMeasure"
      description: Quality measure configuration. Each measure may be individually
        enabled or disabled. Omitting a measure is the same as disabling it.
    RiskAdjustmentConfiguration:
      type: object
      properties:
        asthma:
          description: Asthma configuration
          allOf:
            - $ref: "#/components/schemas/RiskAdjustmentInsight"
        amyotrophicLateralSclerosis:
          description: Amyotrophic Lateral Sclerosis configuration
          allOf:
            - $ref: "#/components/schemas/RiskAdjustmentInsight"
        acuteStroke:
          description: Acute Stroke configuration
          allOf:
            - $ref: "#/components/schemas/RiskAdjustmentInsight"
        cancerSolidTumor:
          description: Cancer Solid Tumor configuration
          allOf:
            - $ref: "#/components/schemas/RiskAdjustmentInsight"
        chronicKidneyDisease:
          description: Chronic Kidney Disease configuration
          allOf:
            - $ref: "#/components/schemas/RiskAdjustmentInsight"
        chronicObstructivePulmonaryDisease:
          description: Chronic Obstructive Pulmonary Disease configuration
          allOf:
            - $ref: "#/components/schemas/RiskAdjustmentInsight"
        cirrhosisOfLiver:
          description: Cirrhosis Of Liver configuration
          allOf:
            - $ref: "#/components/schemas/RiskAdjustmentInsight"
        dementia:
          description: Dementia configuration
          allOf:
            - $ref: "#/components/schemas/RiskAdjustmentInsight"
        diabetes:
          description: Diabetes configuration
          allOf:
            - $ref: "#/components/schemas/RiskAdjustmentInsight"
        heartArrhythmia:
          description: Heart Arrhythmia configuration
          allOf:
            - $ref: "#/components/schemas/RiskAdjustmentInsight"
        heartFailure:
          description: Heart Failure configuration
          allOf:
            - $ref: "#/components/schemas/RiskAdjustmentInsight"
        majorDepression:
          description: Major Depression configuration
          allOf:
            - $ref: "#/components/schemas/RiskAdjustmentInsight"
        morbidObesity:
          description: Morbid Obesity configuration
          allOf:
            - $ref: "#/components/schemas/RiskAdjustmentInsight"
        parkinsonsDisease:
          description: Parkinson's configuration
          allOf:
            - $ref: "#/components/schemas/RiskAdjustmentInsight"
        rheumatoidArthritis:
          description: Rheumatoid Arthritis configuration
          allOf:
          - $ref: "#/components/schemas/RiskAdjustmentInsight"
        seizureDisorder:
          description: Seizure Disorders and Convulsions configuration
          allOf:
          - $ref: "#/components/schemas/RiskAdjustmentInsight"
        thrombocytopenia:
          description: Thrombocytopenia configuration
          allOf:
            - $ref: "#/components/schemas/RiskAdjustmentInsight"
        resolvedConditions:
          description: Resolved Conditions configuration
          allOf:
            - $ref: "#/components/schemas/RiskAdjustmentInsight"
        suspectedConditions:
          description: Suspected Conditions configuration
          allOf:
            - $ref: "#/components/schemas/RiskAdjustmentInsight"
      description: Risk adjustment configuration. Each condition may be individually
        enabled or disabled. Omitting a condition is the same as disabling it. This
        configuration is only effective for customers with the risk adjustment feature
        enabled.
    RiskAdjustmentInsight:
      required:
        - enabled
      type: object
      properties:
        enabled:
          type: boolean
          description: Whether this risk adjustment insight is enabled for care summary
      description: Individual insight for a condition
    ScheduledAppointment:
      required:
        - patient
        - upcomingAppointmentDate
        - upcomingAppointmentProvider
      type: object
      properties:
        patient:
          $ref: "#/components/schemas/Patient"
        upcomingAppointmentDate:
          type: string
          description: Date of the appointment in ISO-8601 format yyyy-MM-dd
          format: date
          example: "2024-11-05"
        upcomingAppointmentProvider:
          $ref: "#/components/schemas/Provider"
        clinicName:
          pattern: "[^<>\"%;+@]*$"
          type: string
          description: "Name of the clinic the patient is being seen at, or the organization\
            \ requesting the data. Customer name will be used if not populated"
          example: Simple Clinic Name
          x-pattern-message: Should not contain special characters
        clinicNpi:
          maxLength: 10
          minLength: 10
          type: string
          description: Facility's NPI if known
          example: "1414912117"
          x-size-message: NPI must be exactly 10 characters
        responseDirectAddress:
          type: string
          description: "Direct Address to return documents to. Typically, populate\
            \ this OR responseFaxNumber"
          format: email
          example: contact@yourdomain.com
          x-pattern-message: response direct address must be a valid format
        responseFaxNumber:
          maxLength: 10
          minLength: 10
          type: string
          description: "Fax number to send response documents to. Typically, populate\
            \ this OR responseDirectAddress"
          example: "6125551234"
        responseFriendlyName:
          pattern: "[^<>\"%;+@]*$"
          type: string
          description: Human-readable name to send response message to
          example: Heart Clinic
          x-pattern-message: Should not contain special characters
        batchId:
          pattern: "[^<>\"%;+@]*$"
          type: string
          description: Identifier which can be used to logically group requests together.
            Do not populate if you do not need to group requests together. Will default
            to a UUID if not populated
          example: BATCH-123
          x-pattern-message: Should not contain special characters
        medicalSummaryPeriod:
          description: "Processing hint which influences the inclusive date range\
            \ for data returned on the medical summary. If this is used, at least\
            \ one diagnostic category must also be enabled."
          allOf:
            - $ref: "#/components/schemas/Period"
        activeIcd10Diagnoses:
          type: array
          description: All active diagnoses (problems) known about the patient. Must
            all be ICD-10 codes. If the patient is an existing patient then this list
            should be populated with all known diagnoses
          items:
            $ref: "#/components/schemas/Diagnosis"
        activeIcd9Diagnoses:
          type: array
          description: All active diagnoses (problems) known about the patient. Must
            all be ICD-9 codes. If the patient is an existing patient then this list
            should be populated with all known diagnoses. **ICD-10 should be greatly
            preferred if available.**
          example:
            - code: "401.1"
              displayName: Benign essential hypertension
              date: "2023-12-12"
          items:
            $ref: "#/components/schemas/Diagnosis"
        activeSnomedDiagnoses:
          type: array
          description: All active diagnoses (problems) known about the patient. Must
            all be SNOMED codes. If the patient is an existing patient then this list
            should be populated with all known diagnoses. **ICD-10 should be greatly
            preferred if available.**
          example:
            - code: "34713006"
              displayName: Vitamin D deficiency
              date: "2023-11-12"
          items:
            $ref: "#/components/schemas/Diagnosis"
        medications:
          type: array
          description: All known medications about the patient
          items:
            $ref: "#/components/schemas/Medication"
        clinicalNotes:
          type: array
          description: Additional information provided about the patient
          items:
            $ref: "#/components/schemas/ClinicalNote"
        directives:
          description: Directives which may influence how the data is processed
          allOf:
            - $ref: "#/components/schemas/Directives_1"
    TimingEvent:
      type: string
      description: "Timing of medication administration, taken from https://www.hl7.org/fhir/R4/valueset-timing-abbreviation.html\
        \ (OID 2.16.840.1.113883.4.642.3.78). Should be consistent with frequency\
        \ if both populated"
      example: QD
      enum:
        - BID
        - TID
        - QID
        - AM
        - PM
        - QD
        - QOD
        - Q1H
        - Q2H
        - Q3H
        - Q4H
        - Q6H
        - Q8H
        - BED
        - WK
        - MO
  securitySchemes:
    apiKey:
      type: apiKey
      description: API Key
      name: apiKey
      in: header
