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

# Create Patient

### Patient Creation Walkthrough

1. Get the provider that you want to create a patient for through the [Get Providers API](/api-reference/v1providersresource/get-providers).
2. Get the service location where the patient receives services through the [Get Service Locations API](/api-reference/v1providerservicelocationsresource/get-service-locations).
3. Use this endpoint to create a patient with the provider and service location information. We recommend including the EHR ID
   if you have one available as this will help identify the patient as it is represented in your system.

#### Creation with Place Of Service and Diagnosis Codes

After you create a patient, you can add place of service codes and diagnosis codes by using our Place Of Service and Diagnosis APIs. For Place Of Service, you would do the following:

1. Get the Place Of Services configured for your provider service location by making a request through the [Get Provider Places of Service API](/api-reference/v1providerplaceofservicesresource/get-provider-place-of-service) .
2. With the returned place of services, you can then make a POST request to [Create Patient Place of Service API](/api-reference/v1patientplaceofservicesresource/create-patient-place-of-service) with the patient\_id of the patient you just created and a `provider_place_of_service_id` that you got from the [Get Service Locations API](/api-reference/v1providerservicelocationsresource/get-service-locations).

To add a diagnosis to a patient, you would make a POST request to the [Create Patient Diagnosis API](/api-reference/v1patientdiagnosisresource/create-patient-diagnosis) with the patient\_id and a diagnosis code. Please refer to [here](https://www.cms.gov/medicare/coordination-benefits-recovery/overview/icd-code-lists) for a list of ICD-10 diagnosis codes that you can use.


## OpenAPI

````yaml post /public/v1/patients/
openapi: 3.0.2
info:
  title: Silna Public API
  version: '1.0'
servers:
  - url: https://app.silnahealth.com/api
security:
  - bearerAuth: []
paths:
  /public/v1/patients/:
    post:
      tags:
        - V1PatientsResource
      summary: Create Patient
      operationId: V1PatientsResource.post
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V1PatientCreate'
        description: |2-

              Patient Create Request Schema
              
      responses:
        '201':
          description: |2-

                Patient Create Response Schema
                
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V1PatientCreateResponse'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                description: The maximum number of requests allowed in the time window
            X-RateLimit-Remaining:
              schema:
                type: integer
                description: The number of requests remaining in the current time window
            X-RateLimit-Reset:
              schema:
                type: integer
                description: The time when the rate limit will reset, in Unix timestamp
            Retry-After:
              schema:
                type: number
                description: The number of seconds to wait before making another request
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                description: The maximum number of requests allowed in the time window
            X-RateLimit-Remaining:
              schema:
                type: integer
                description: The number of requests remaining in the current time window
            X-RateLimit-Reset:
              schema:
                type: integer
                description: The time when the rate limit will reset, in Unix timestamp
            Retry-After:
              schema:
                type: number
                description: The number of seconds to wait before making another request
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationError'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                description: The maximum number of requests allowed in the time window
            X-RateLimit-Remaining:
              schema:
                type: integer
                description: The number of requests remaining in the current time window
            X-RateLimit-Reset:
              schema:
                type: integer
                description: The time when the rate limit will reset, in Unix timestamp
            Retry-After:
              schema:
                type: number
                description: The number of seconds to wait before making another request
        '429':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                description: The maximum number of requests allowed in the time window
            X-RateLimit-Remaining:
              schema:
                type: integer
                description: The number of requests remaining in the current time window
            X-RateLimit-Reset:
              schema:
                type: integer
                description: The time when the rate limit will reset, in Unix timestamp
            Retry-After:
              schema:
                type: number
                description: The number of seconds to wait before making another request
components:
  schemas:
    V1PatientCreate:
      description: Patient Create Request Schema
      properties:
        first_name:
          description: Patient's first name
          title: First Name
          type: string
        last_name:
          description: Patient's last name
          title: Last Name
          type: string
        date_of_birth:
          description: Patient's date of birth
          format: date
          title: Date Of Birth
          type: string
        source_id:
          default: null
          description: >-
            Patient's EHR ID (or other unique identifier) that you have in your
            system
          title: Source Id
          nullable: true
          type: string
        address_line_1:
          default: null
          description: Patient's street address
          title: Address Line 1
          nullable: true
          maxLength: 255
          type: string
        address_line_2:
          default: null
          description: Patient's apartment, suite, unit, etc.
          title: Address Line 2
          nullable: true
          maxLength: 255
          type: string
        city:
          default: null
          description: Patient's city
          title: City
          nullable: true
          maxLength: 255
          type: string
        state:
          default: null
          description: Patient's state
          title: State
          nullable: true
          maxLength: 255
          type: string
        zip_code:
          default: null
          description: Patient's zip code. Empty strings are not allowed
          title: Zip Code
          nullable: true
          type: string
        sex:
          $ref: '#/components/schemas/PatientSex'
          default: null
          description: Patient's sex
          nullable: true
        patient_specialties:
          description: Patient's specialties. A patient can have multiple
          items:
            $ref: '#/components/schemas/PublicSpecialty'
          title: Patient Specialties
          type: array
        status:
          $ref: '#/components/schemas/PatientStatus'
          description: Patient's status
        provider_service_location_id:
          description: Provider Service Location ID (where the patient receives service)
          format: uuid
          title: Provider Service Location Id
          type: string
        provider_id:
          format: uuid
          title: Provider Id
          type: string
      required:
        - first_name
        - last_name
        - date_of_birth
        - patient_specialties
        - status
        - provider_service_location_id
        - provider_id
      title: V1PatientCreate
      type: object
      x-folder: public_api
    V1PatientCreateResponse:
      description: Patient Create Response Schema
      properties:
        patient_id:
          format: uuid
          title: Patient Id
          type: string
      required:
        - patient_id
      title: V1PatientCreateResponse
      type: object
      x-folder: public_api
    ValidationError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          description: Human readable error message
      x-folder: null
    AuthenticationError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          description: Human readable error message
        type:
          $ref: '#/components/schemas/PublicApiErrorType'
      x-folder: null
    TooManyRequestsError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          description: Human readable error message
      x-folder: null
    PatientSex:
      type: string
      enum:
        - MALE
        - FEMALE
      x-folder: patient
    PublicSpecialty:
      type: string
      enum:
        - PHYSICAL_THERAPY
        - ABA_THERAPY
        - SPEECH_THERAPY
        - OCCUPATIONAL_THERAPY
        - PSYCHOLOGICAL_TESTING
        - HOME_HEALTH_CARE
        - HOSPICE
        - CARDIAC_REHABILITATION
        - INTENSIVE_CARDIAC_REHABILITATION
        - MENTAL_HEALTH
        - PRINCIPAL_ILLNESS_NAVIGATION
        - PRINCIPAL_CARE_MANAGEMENT
        - ADVANCED_PRIMARY_CARE_MODELS
        - PREVENTATIVE_HEALTH
        - PARTIAL_HOSPITALIZATION_PROGRAM
        - INTENSIVE_OUTPATIENT_PROGRAM
        - INTERVENTIONAL_RADIOLOGY
        - VASCULAR_SURGERY
        - INTERVENTIONAL_CARDIOLOGY
        - ORTHOPEDICS
        - CHIROPRACTIC
        - GYNECOLOGY
        - LONG_TERM_CARE
        - NUTRITIONAL_COUNSELING
        - PHYSICAL_MEDICINE
        - PULMONARY_REHABILITATION
        - INJECTABLE_SPECIALTY_MEDICATIONS
        - ALLERGY_TESTING
        - SKILLED_NURSING
        - RADIOLOGY
        - OTOLARYNGOLOGY
        - DURABLE_MEDICAL_EQUIPMENT
        - DERMATOLOGY
        - PROFESSIONAL_OFFICE_VISIT
      x-folder: specialty
    PatientStatus:
      type: string
      enum:
        - INTAKE
        - ACTIVE
        - DISCHARGED
        - ON_HOLD
      x-folder: patient
    PublicApiErrorType:
      type: string
      enum:
        - AUTH_INVALID_REQUEST_HEADER
        - AUTH_INVALID_CREDENTIALS
      x-folder: null
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````