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

# Contribute document to HIE

> Contributes a document to the HIE network for a specific patient.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/samplehc/openapi.documented.yml post /api/v2/hie/documents/upload
openapi: 3.0.3
info:
  title: Sample Healthcare API
  description: API for Sample Healthcare
  version: 1.0.0
servers: []
security: []
paths:
  /api/v2/hie/documents/upload:
    post:
      tags:
        - HIE
      summary: Contribute document to HIE
      description: Contributes a document to the HIE network for a specific patient.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                patientId:
                  type: string
                  description: >-
                    The external Patient ID that you store and can use to
                    reference this Patient.
                fileMetadataId:
                  type: string
                  description: The ID of the file metadata to upload.
                documentType:
                  type: object
                  properties:
                    text:
                      type: string
                      description: Plain text representation of the document type.
                    coding:
                      type: array
                      items:
                        type: object
                        properties:
                          code:
                            type: string
                            description: The code from the terminology system.
                          system:
                            type: string
                            description: >-
                              The terminology system URI (e.g.,
                              http://loinc.org).
                          display:
                            type: string
                            description: Human-readable display name for the code.
                        required:
                          - code
                          - system
                          - display
                        additionalProperties: false
                      description: Array of coded representations from terminology systems.
                  required:
                    - text
                  additionalProperties: false
                  description: The type of document being uploaded.
                description:
                  type: string
                  description: A brief description of the document.
                facilityName:
                  type: string
                  description: >-
                    The name and type of facility (e.g., 'John Snow Clinic -
                    Acute Care Centre').
                dateStart:
                  type: string
                  description: ISO 8601 timestamp for when the document period starts.
                dateEnd:
                  type: string
                  description: ISO 8601 timestamp for when the document period ends.
              required:
                - patientId
                - fileMetadataId
                - documentType
                - description
              additionalProperties: false
        required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties: {}
                additionalProperties: false

````