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

# Create Referral Order



## OpenAPI

````yaml post /api/2.0/referral_orders/
openapi: 3.1.0
info:
  contact:
    name: Elation Health
    url: https://www.elationhealth.com/
  description: Elation Health API v2.0
  title: Patient Document API
  version: 2.0.0
servers:
  - description: Sandbox Server
    url: https://sandbox.elationemr.com
  - description: Production Server
    url: https://api.app.elationemr.com
security: []
paths:
  /api/2.0/referral_orders/:
    post:
      tags:
        - Referrals
      summary: Create Referral Order
      operationId: referral_orders_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReferralOrder'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReferralOrder'
          description: ''
      security:
        - oauth2: []
components:
  schemas:
    ReferralOrder:
      properties:
        auth_number:
          maxLength: 20
          type:
            - string
            - 'null'
        authorization_for:
          oneOf:
            - $ref: '#/components/schemas/AuthorizationForEnum'
            - $ref: '#/components/schemas/NullEnum'
        authorization_for_short:
          type:
            - string
            - 'null'
        consultant_name:
          maxLength: 1024
          type:
            - string
            - 'null'
        date_for_reEval:
          format: date
          type:
            - string
            - 'null'
        icd10_codes:
          items:
            $ref: '#/components/schemas/ICD10Code'
          type: array
        id:
          readOnly: true
          type: integer
        letter:
          deprecated: true
          description: >-
            The letter associated with this referral order. Use referral_letter
            for the full nested letter object.
          format: int64
          readOnly: true
          type: integer
        patient:
          format: int64
          type: integer
        practice:
          format: int64
          type: integer
        referral_letter:
          allOf:
            - $ref: '#/components/schemas/ReferralLetter'
          description: Nested letter object with full details.
          readOnly: true
        resolution:
          $ref: '#/components/schemas/DocumentResolutionState'
        short_consultant_name:
          maxLength: 1024
          type:
            - string
            - 'null'
        sign_date:
          description: The datetime when this referral order was signed.
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        signed_by:
          description: The ID of the user who signed this referral order.
          readOnly: true
          type: integer
        specialty:
          $ref: '#/components/schemas/MedicalSpecialty'
      required:
        - auth_number
        - consultant_name
        - date_for_reEval
        - patient
        - practice
        - short_consultant_name
        - specialty
      type: object
    AuthorizationForEnum:
      enum:
        - Consult (One Visit Only)
        - Procedure / Testing Only
        - Referral For Treatment, includes Consult Visit
      type: string
    NullEnum:
      type: 'null'
    ICD10Code:
      properties:
        code:
          maxLength: 50
          type: string
        description:
          maxLength: 500
          type:
            - string
            - 'null'
      required:
        - code
      type: object
    ReferralLetter:
      properties:
        body:
          description: The body of the letter.
          type: string
        delivery_date:
          format: date-time
          type:
            - string
            - 'null'
        id:
          readOnly: true
          type: integer
        sign_date:
          format: date-time
          type:
            - string
            - 'null'
      type: object
    DocumentResolutionState:
      properties:
        created_date:
          description: The datetime when this resolution state was created.
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        deleted_date:
          description: >-
            The datetime when this resolution was deleted. Should never be null
            because we're providing the most updated resolution.
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        document:
          description: Will be the same as the id of the lab order.
          format: int64
          readOnly: true
          type: integer
        id:
          description: Internal id to represent the resolution state.
          readOnly: true
          type: integer
        note:
          description: Any note that was added to represent why an order was cancelled.
          maxLength: 200
          type:
            - string
            - 'null'
        resolving_document:
          description: >-
            If the order is fulfilled will indicate the document referenced. For
            lab orders will usually be a report. Must be an integer ID or null.
          format: int64
          type:
            - integer
            - 'null'
        state:
          allOf:
            - $ref: '#/components/schemas/StateEnum'
          description: |-
            The resolution state of the order.

            * `outstanding` - Outstanding
            * `fulfilled` - Fulfilled
            * `cancelled` - Cancelled
      required:
        - state
      type: object
    MedicalSpecialty:
      properties:
        abbreviation:
          maxLength: 20
          type: string
        category:
          $ref: '#/components/schemas/MedicalSpecialtyCategory'
        created_date:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        id:
          readOnly: true
          type: integer
        name:
          maxLength: 100
          type: string
        practice_created:
          format: int64
          type:
            - integer
            - 'null'
      required:
        - abbreviation
        - name
      type: object
    StateEnum:
      description: |-
        * `outstanding` - Outstanding
        * `fulfilled` - Fulfilled
        * `cancelled` - Cancelled
      enum:
        - outstanding
        - fulfilled
        - cancelled
      type: string
    MedicalSpecialtyCategory:
      properties:
        abbreviation:
          maxLength: 20
          type:
            - string
            - 'null'
        created_date:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        id:
          readOnly: true
          type: integer
        name:
          maxLength: 100
          type: string
      required:
        - name
      type: object
  securitySchemes:
    oauth2:
      flows:
        clientCredentials:
          scopes:
            act_as_user: >-
              Impersonate a provider via X-On-Behalf-Of (combinable with apiv2
              or system scopes)
            apiv2: Full access to the API
            system/{resource_name}.read: Read access to a specific resource
            system/{resource_name}.write: Write access to a specific resource
          tokenUrl: /api/2.0/oauth2/token/
      type: oauth2

````