Canvas Medical Patient API

Patient demographic and administrative data

OpenAPI Specification

canvas-medical-patient-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Canvas Medical FHIR AllergyIntolerance Patient API
  description: 'A FHIR R4-compliant REST API providing secure access to electronic health record data. Canvas Medical supports 41 FHIR resources (21 with write capabilities) covering clinical, administrative, financial, and care coordination domains. The API follows the HL7 FHIR R4 specification and supports OAuth 2.0 Client Credentials and Authorization Code flows with SMART on FHIR scopes for machine-to-machine and user-delegated access.

    '
  version: '4.0'
  contact:
    name: Canvas Medical Support
    url: https://help.canvasmedical.com/
  termsOfService: https://www.canvasmedical.com/
  license:
    name: HL7 FHIR R4
    url: https://hl7.org/fhir/R4/
servers:
- url: https://fumage-{canvas-instance}.canvasmedical.com
  description: FHIR R4 base URL (fumage subdomain)
  variables:
    canvas-instance:
      default: yoursandbox
      description: Your Canvas Medical instance name
security:
- OAuth2ClientCredentials: []
- OAuth2AuthCode: []
- BearerAuth: []
tags:
- name: Patient
  description: Patient demographic and administrative data
paths:
  /Patient:
    get:
      operationId: searchPatient
      summary: Search Patients
      description: Search for patient records. Supports search by name, birthdate, identifier, gender, and more.
      tags:
      - Patient
      parameters:
      - name: name
        in: query
        schema:
          type: string
        description: Search by patient name (family or given)
      - name: family
        in: query
        schema:
          type: string
      - name: given
        in: query
        schema:
          type: string
      - name: birthdate
        in: query
        schema:
          type: string
          format: date
      - name: gender
        in: query
        schema:
          type: string
          enum:
          - male
          - female
          - other
          - unknown
      - name: identifier
        in: query
        schema:
          type: string
        description: Search by identifier (system|value)
      - $ref: '#/components/parameters/count'
      - $ref: '#/components/parameters/pageToken'
      responses:
        '200':
          description: Bundle of matching patients
          content:
            application/fhir+json:
              schema:
                $ref: '#/components/schemas/Bundle'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createPatient
      summary: Create Patient
      description: Create a new patient record in Canvas Medical
      tags:
      - Patient
      requestBody:
        required: true
        content:
          application/fhir+json:
            schema:
              $ref: '#/components/schemas/Patient'
      responses:
        '201':
          description: Patient created
          headers:
            Location:
              schema:
                type: string
          content:
            application/fhir+json:
              schema:
                $ref: '#/components/schemas/Patient'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
  /Patient/{id}:
    get:
      operationId: readPatient
      summary: Read Patient
      description: Retrieve a specific patient by their logical ID
      tags:
      - Patient
      parameters:
      - $ref: '#/components/parameters/resourceId'
      responses:
        '200':
          description: Patient resource
          content:
            application/fhir+json:
              schema:
                $ref: '#/components/schemas/Patient'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/ResourceNotFound'
    put:
      operationId: updatePatient
      summary: Update Patient
      description: Update an existing patient record
      tags:
      - Patient
      parameters:
      - $ref: '#/components/parameters/resourceId'
      requestBody:
        required: true
        content:
          application/fhir+json:
            schema:
              $ref: '#/components/schemas/Patient'
      responses:
        '200':
          description: Patient updated
          content:
            application/fhir+json:
              schema:
                $ref: '#/components/schemas/Patient'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/ResourceNotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
components:
  schemas:
    Address:
      type: object
      properties:
        use:
          type: string
          enum:
          - home
          - work
          - temp
          - old
          - billing
        type:
          type: string
          enum:
          - postal
          - physical
          - both
        text:
          type: string
        line:
          type: array
          items:
            type: string
        city:
          type: string
        district:
          type: string
        state:
          type: string
        postalCode:
          type: string
        country:
          type: string
    Bundle:
      type: object
      properties:
        resourceType:
          type: string
          default: Bundle
        id:
          type: string
        type:
          type: string
          enum:
          - document
          - message
          - transaction
          - transaction-response
          - batch
          - batch-response
          - history
          - searchset
          - collection
          - subscription-notification
        total:
          type: integer
        link:
          type: array
          items:
            type: object
            properties:
              relation:
                type: string
              url:
                type: string
        entry:
          type: array
          items:
            type: object
            properties:
              fullUrl:
                type: string
              resource:
                $ref: '#/components/schemas/FHIRResource'
              search:
                type: object
                properties:
                  mode:
                    type: string
                    enum:
                    - match
                    - include
                    - outcome
    Patient:
      allOf:
      - $ref: '#/components/schemas/FHIRResource'
      - type: object
        required:
        - resourceType
        properties:
          resourceType:
            type: string
            default: Patient
          identifier:
            type: array
            items:
              $ref: '#/components/schemas/Identifier'
          active:
            type: boolean
          name:
            type: array
            items:
              $ref: '#/components/schemas/HumanName'
          telecom:
            type: array
            items:
              $ref: '#/components/schemas/ContactPoint'
          gender:
            type: string
            enum:
            - male
            - female
            - other
            - unknown
          birthDate:
            type: string
            format: date
          deceasedBoolean:
            type: boolean
          deceasedDateTime:
            type: string
            format: date-time
          address:
            type: array
            items:
              $ref: '#/components/schemas/Address'
          extension:
            type: array
            items:
              type: object
            description: Canvas-specific extensions including us-core-race, us-core-ethnicity, us-core-birthsex, preferred-pharmacy
    Narrative:
      type: object
      properties:
        status:
          type: string
          enum:
          - generated
          - extensions
          - additional
          - empty
        div:
          type: string
    Meta:
      type: object
      properties:
        versionId:
          type: string
        lastUpdated:
          type: string
          format: date-time
        source:
          type: string
        profile:
          type: array
          items:
            type: string
        tag:
          type: array
          items:
            $ref: '#/components/schemas/Coding'
    Coding:
      type: object
      properties:
        system:
          type: string
        version:
          type: string
        code:
          type: string
        display:
          type: string
        userSelected:
          type: boolean
    HumanName:
      type: object
      properties:
        use:
          type: string
          enum:
          - usual
          - official
          - temp
          - nickname
          - anonymous
          - old
          - maiden
        text:
          type: string
        family:
          type: string
        given:
          type: array
          items:
            type: string
        prefix:
          type: array
          items:
            type: string
        suffix:
          type: array
          items:
            type: string
    CodeableConcept:
      type: object
      properties:
        coding:
          type: array
          items:
            $ref: '#/components/schemas/Coding'
        text:
          type: string
    Period:
      type: object
      properties:
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
    ContactPoint:
      type: object
      properties:
        system:
          type: string
          enum:
          - phone
          - fax
          - email
          - pager
          - url
          - sms
          - other
        value:
          type: string
        use:
          type: string
          enum:
          - home
          - work
          - temp
          - old
          - mobile
    OperationOutcome:
      type: object
      properties:
        resourceType:
          type: string
          default: OperationOutcome
        issue:
          type: array
          items:
            type: object
            properties:
              severity:
                type: string
                enum:
                - fatal
                - error
                - warning
                - information
              code:
                type: string
              details:
                $ref: '#/components/schemas/CodeableConcept'
              diagnostics:
                type: string
              location:
                type: array
                items:
                  type: string
    FHIRResource:
      type: object
      description: Base FHIR R4 resource properties
      properties:
        resourceType:
          type: string
          description: FHIR resource type name
        id:
          type: string
          description: Logical id of this artifact
        meta:
          $ref: '#/components/schemas/Meta'
        text:
          $ref: '#/components/schemas/Narrative'
    Identifier:
      type: object
      properties:
        use:
          type: string
          enum:
          - usual
          - official
          - temp
          - secondary
          - old
        type:
          $ref: '#/components/schemas/CodeableConcept'
        system:
          type: string
        value:
          type: string
        period:
          $ref: '#/components/schemas/Period'
  responses:
    ResourceNotFound:
      description: Resource not found
      content:
        application/fhir+json:
          schema:
            $ref: '#/components/schemas/OperationOutcome'
    UnprocessableEntity:
      description: Validation error
      content:
        application/fhir+json:
          schema:
            $ref: '#/components/schemas/OperationOutcome'
    Unauthorized:
      description: Authentication required
      content:
        application/fhir+json:
          schema:
            $ref: '#/components/schemas/OperationOutcome'
  parameters:
    pageToken:
      name: _page_token
      in: query
      schema:
        type: string
      description: Pagination token for next page
    count:
      name: _count
      in: query
      schema:
        type: integer
        default: 20
      description: Maximum number of results per page
    resourceId:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: Logical ID of the FHIR resource
  securitySchemes:
    OAuth2ClientCredentials:
      type: oauth2
      description: 'Machine-to-machine authentication using client credentials grant. Obtain client_id and client_secret from Canvas admin panel.

        '
      flows:
        clientCredentials:
          tokenUrl: https://{canvas-instance}.canvasmedical.com/auth/token/
          scopes:
            system/*.read: Read all FHIR resources
            system/*.write: Write all FHIR resources
            system/Patient.read: Read Patient resources
            system/Patient.write: Write Patient resources
            system/Appointment.read: Read Appointment resources
            system/Appointment.write: Write Appointment resources
            system/Observation.read: Read Observation resources
            system/Observation.write: Write Observation resources
    OAuth2AuthCode:
      type: oauth2
      description: 'User-delegated access using Authorization Code flow with SMART on FHIR scopes.

        '
      flows:
        authorizationCode:
          authorizationUrl: https://{canvas-instance}.canvasmedical.com/auth/authorize/
          tokenUrl: https://{canvas-instance}.canvasmedical.com/auth/token/
          scopes:
            patient/*.read: Read patient-context FHIR resources
            user/*.read: Read user-context FHIR resources
            user/*.write: Write user-context FHIR resources
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
externalDocs:
  description: Canvas Medical FHIR API Documentation
  url: https://docs.canvasmedical.com/api/