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

# Show or create an authorized patient's medical history

> Returns the medical history for an authorized patient. If no active history exists, this read creates a new medical history record.



## OpenAPI

````yaml /openapi/nimbo_patient_portal.yml get /api/v1/patient_portal/people/{person_id}/medical_history
openapi: 3.1.0
info:
  title: Nimbo patient portal
  version: 1.0.0
  description: >-
    Nimbo API reference. Use the API host and integration access provided by
    Nimbo.
servers:
  - url: https://api.example.test
security: []
tags:
  - name: Patient Portal
  - name: Patient portal authentication
paths:
  /api/v1/patient_portal/people/{person_id}/medical_history:
    get:
      tags:
        - Patient Portal
      summary: Show or create an authorized patient's medical history
      description: >-
        Returns the medical history for an authorized patient. If no active
        history exists, this read creates a new medical history record.
      operationId: showPatientPortalPersonMedicalHistory
      parameters:
        - name: person_id
          in: path
          required: true
          schema:
            type: integer
          example: 123
      responses:
        '200':
          description: Medical history visible to the authorized patient.
          content:
            application/json:
              schema:
                type: object
                required:
                  - medical_history
                additionalProperties: false
                properties:
                  medical_history:
                    type: object
                    required:
                      - records
                      - editable
                      - id
                    additionalProperties: false
                    properties:
                      id:
                        type: integer
                      editable:
                        type: boolean
                      records:
                        type: object
                        additionalProperties: true
        '401':
          description: Missing, expired, invalid, or unauthorized patient portal token.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                additionalProperties: false
                properties:
                  error:
                    type: string
              examples:
                unauthorized:
                  value:
                    error: Unauthorized
        '404':
          description: >-
            The requested resource was not found or is outside the authorized
            patient scope.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                additionalProperties: false
                properties:
                  error:
                    type: string
              examples:
                not_found:
                  value:
                    error: Not found
      security:
        - PatientPortalToken: []
components:
  securitySchemes:
    PatientPortalToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        Patient portal JWT accepted either as a raw Authorization header value
        or as a Bearer token for client compatibility.

````