---
swagger: "2.0"
info:
  description: Welcome to the ACC Change Of Diagnosis API. This is a secondary interaction linked to a Claim. From a software vendor perspective this is a subset of the Medical Certificate. From a Provider perspective, making this a separate identifiable service adds considerable value.
  version: 2.0.0
  title: ACC Change Of Diagnosis API
  termsOfService: https://developer.acc.co.nz/terms-conditions
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
host: apiservicesnpe.acc.co.nz
basePath: /api/v2
tags:
- name: Change Of Diagnosis
  description: Change Of Diagnosis Controller
schemes:
- "https"
securityDefinitions:
  apiKeyHeader:
    type: apiKey
    name: apikey
    in: header
security:
  - apiKeyHeader: []
paths:
  /claims/change-diagnosis:
    post:
      tags:
      - Change Of Diagnosis
      summary: Create a new Change Of Diagnosis.
      description: <p> Allows software vendors to create a change of diagnosis with ACC. The change of diagnosis is a secondary interaction (linked to a Claim) generated for reasons such as patient revisits with new symptoms or the initial provider has referred the patient to a specialist (e.g. xray, physio, surgeon) who diagnoses a more detailed understanding of the injury. From a software vendor perspective this is a subset of the Medical Certificate. From a Provider perspective, making this a separate identifiable service adds considerable value.</p>

      operationId: change-diagnosis
      consumes:
      - application/json
      produces:
      - application/json
      - '*/*'
      parameters:
      - in: body
        name: body
        required: true
        schema:
          $ref: '#/definitions/ChangeDiagnosis'
      responses:
        200:
          description: OK
          schema:
            $ref: '#/definitions/ChangeDiagnosisCreatedResponse'
        202:
          description: Accepted
          schema:
            $ref: '#/definitions/ChangeDiagnosisCreatedResponse'
        400:
          description: 'Bad Request: invalid data'
          schema:
            $ref: '#/definitions/ApiException'
        401:
          description: 'Unauthorized: authentication error'
          schema:
            $ref: '#/definitions/ApiException'
        403:
          description: 'Forbidden: authorization error'
          schema:
            $ref: '#/definitions/ApiException'
        404:
          description: Not Found
          schema:
            $ref: '#/definitions/ApiException'
        500:
          description: Internal Server Error
          schema:
            $ref: '#/definitions/ApiException'
definitions:
  AccAssistance:
    type: object
    properties:
      issuesDetails:
        type: string
        description: What complications or other issues are affecting recovery or rehabilitation?
      otherComments:
        type: string
        description: 'What other assistance (equipment, home help, transport) should the patient discuss with a case manager?'
  AccContact:
    type: object
    properties:
      anyDay:
        type: string
        description: Only required when contactRequired is true.
        enum:
          - 'True'
          - 'False'
      preferredContactDay:
        type: array
        description: Only required when contactRequired is true and anyDay is false.
        items:
          type: string
          enum:
            - Monday
            - Tuesday
            - Wednesday
            - Thursday
            - Friday
      contactComments:
        type: string
        description: Optional when contactRequired is true.
  Address:
    type: object
    required:
      - city
      - country
      - line1
      - postCode
      - type
    properties:
      type:
        type: string
        enum:
          - Home
          - Postal
      line1:
        type: string
      line2:
        type: string
      suburb:
        type: string
      city:
        type: string
      postCode:
        type: string
      country:
        type: string
  ApiError:
    type: object
    properties:
      field:
        type: string
      message:
        type: string
  ApiException:
    type: object
    properties:
      errors:
        type: array
        items:
          $ref: '#/definitions/ApiError'
  Contact:
    type: object
    properties:
      emailAddress:
        type: string
      mobilePhone:
        type: string
      homePhone:
        type: string
      workPhone:
        type: string
  DateRange:
    type: object
    required:
      - fromDate
      - toDate
    properties:
      fromDate:
        type: string
        format: date
        description: Date ranges must have no gaps and no overlaps.
      toDate:
        type: string
        format: date
        description: Date ranges must have no gaps and no overlaps.
    description: A valid date is required for each incapacity type selected.
  Declaration:
    type: object
    required:
      - providerDeclaration
    properties:
      providerDeclaration:
        type: string
        format: date
        description: The date the form was submitted.
  Diagnosis:
    type: object
    required:
      - diagnosisAction
      - diagnosisCode
      - diagnosisCodeType
      - diagnosisDescription
      - diagnosisSide
      - primaryDiagnosisIndicator
    properties:
      diagnosisCodeType:
        type: string
        description: See the DiagnosisCodingSystem code tables for valid values.
      diagnosisCode:
        type: string
        description: 'Alphanumeric, can include ''.'''
      diagnosisDescription:
        type: string
      diagnosisSide:
        type: string
        enum:
          - left
          - right
          - notApplicable
      diagnosisComment:
        type: string
      diagnosisAction:
        type: string
        enum:
          - add
          - modify
          - delete
      primaryDiagnosisIndicator:
        type: string
        description: Select exactly one diagnosis in a request as primary.
        enum:
          - 'True'
          - 'False'
  Incapacity:
    type: object
    required:
      - incapacityDateRange
      - incapacityType
      - selectedAlternativeWork
    properties:
      incapacityType:
        type: string
        description: 'You can select ''fully unfit'' no more than once, and ''fit for selected'' no more than twice.'
        enum:
          - Fitforselectedwork
          - Fullyunfitforwork
      incapacityDateRange:
        $ref: '#/definitions/DateRange'
      incapacityComments:
        type: string
        description: Only required when Fullyunfitforwork is true.
      selectedAlternativeWork:
        $ref: '#/definitions/SelectedAlternativeWork'
  ChangeDiagnosis:
    type: object
    required:
      - diagnosis
      - pmsSoftwareName
      - pmsSoftwareVersion
    properties:
      pmsSoftwareName:
        type: string
      pmsSoftwareVersion:
        type: string
      claimNumber:
        type: string
        description: '1-12 alphanumeric characters. Examples: A123456, AA12345, 1234567, 12345678901, A1234567890 where A represents an alphabetic character and each digit represents any digit.'
      declaration:
        $ref: '#/definitions/Declaration'
      diagnosis:
        type: array
        description: 'If present, this must contain at least one diagnosis. 20 diagnoses permitted.'
        items:
          $ref: '#/definitions/Diagnosis'
      patient:
        $ref: '#/definitions/Patient'
      provider:
        $ref: '#/definitions/Provider'
      vendor:
        $ref: '#/definitions/Vendor'
  ChangeDiagnosisCreatedResponse:
    type: object
    properties:
      medicalCertificateId:
        type: string
      medicalCertificate:
        $ref: '#/definitions/ChangeDiagnosis'
      createdAt:
        type: string
        format: date
      lastUpdate:
        type: string
        format: date
  Patient:
    type: object
    required:
      - address
      - details
    properties:
      address:
        $ref: '#/definitions/Address'
      contact:
        $ref: '#/definitions/Contact'
      details:
        $ref: '#/definitions/PatientDetails'
  PatientDetails:
    type: object
    required:
      - accidentDate
      - dateOfBirth
      - firstName
      - surname
    properties:
      accidentDate:
        type: string
        format: date
      dateOfBirth:
        type: string
        format: date
      nhi:
        type: string
      firstName:
        type: string
      middleName:
        type: string
      surname:
        type: string
  PhysicalRestrictions:
    type: object
    properties:
      restriction:
        type: string
        enum:
          - Lifting
          - Posture
          - Heavy Physical
          - Repetition
          - Vibration
          - Temperature
          - Driving
          - Prolonged Sitting
          - Prolonged Walking
          - Prolonged Standing
          - Other
  Provider:
    type: object
    required:
      - address
      - details
    properties:
      address:
        $ref: '#/definitions/Address'
      contact:
        $ref: '#/definitions/Contact'
      details:
        $ref: '#/definitions/ProviderDetails'
  ProviderDetails:
    type: object
    required:
      - firstName
      - providerId
      - providerTypeCode
      - surname
    properties:
      providerId:
        type: string
        description: 'The provider''s ACC or HPI number, 1-8 characters.'
      providerTypeCode:
        type: string
        description: See the ProviderType code tables for valid values.
      firstName:
        type: string
      middleName:
        type: string
      surname:
        type: string
  ReturnToWork:
    type: object
    required:
      - assistanceRequired
    properties:
      assistanceRequired:
        type: string
        description: Is return to work assistance required?
        enum:
          - 'True'
          - 'False'
      assistanceType:
        type: string
        description: Only required when assistanceRequired is true.
        enum:
          - needSupport
          - needClinicalReview
  SelectedAlternativeWork:
    type: object
    properties:
      restrictionComment:
        type: string
        description: Optional if Fitforselectedwork is true.
      restrictedHoursPerDay:
        type: number
        format: double
        description: 'Optional, values 0.50 through 16.00'
      restrictedDaysPerWeek:
        type: integer
        format: int32
        description: 'Optional, values 1 through 7'
      physicalRestrictions:
        type: array
        description: 'Optional if Fitforselectedwork is true, otherwise not permitted. Any of the listed items can be selected once, up to 11 choices.'
        items:
          $ref: '#/definitions/PhysicalRestrictions'
  Vendor:
    type: object
    required:
      - hpiOrganisationNumber
      - practiceName
    properties:
      hpiFacilityNumber:
        type: string
        example: 'F2C051, 87'
        description: ID of the facility where the service was provided.
      hpiOrganisationNumber:
        type: string
        description: '1-12 alphanumeric characters, can include ''\\'''
      practiceName:
        type: string
        description: 1-40 characters.
