swagger: '2.0'
info:
  version: 2.0.4
  description: Welcome to the Integrated Home and Community Support (IHCS) API. IHCS is a contract issued to only a few external parties so it pays to check with your user base first.
  title: Integrated Home & Community Support
  license:
    name: Apache 2.0
    url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
schemes:
  - https
host: apiservicesnpe.acc.co.nz
securityDefinitions:
  apiKeyHeader:
    type: apiKey
    name: apikey
    in: header
security:
  - apiKeyHeader: []
basePath: /v2/provider/home-community-support-services
tags:
  - name: IHCS
    description: Integrated Home and Community Support
paths:
  /service/start:
    post:
      tags:
        - IHCS
      summary: Submit a service commencement report
      description: IHCS is a contract issued to only a few external parties. There is a series of APIs to consider. This specific API supports the submission of a service commencement report.
      operationId: Service Commencement
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/ServiceCommencement'
      responses:
        200:
          description: OK
          schema:
            $ref: '#/definitions/IHCSResponse'
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
  /service/completion:
    post:
      tags:
        - IHCS
      summary: Submit a service completion report
      description: IHCS is a contract issued to only a few external parties. There is a series of APIs to consider. This specific API supports the submission of a service completion report.
      operationId: Service Completion
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/ServiceCompletion'
      responses:
        200:
          description: OK
          schema:
            $ref: '#/definitions/IHCSResponse'
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
  /supplier:
    post:
      tags:
        - IHCS
      summary: Submit a supplier review report
      description: IHCS is a contract issued to only a few external parties. There is a series of APIs to consider. This specific API supports the submission of a supplier review report.
      operationId: Supplier Review
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/SupplierReview'
      responses:
        200:
          description: OK
          schema:
            $ref: '#/definitions/IHCSResponse'
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
definitions:
  ServiceCommencement:
    type: object
    required:
      - reportingYear
      - reportingMonth
      - supplierId
      - claimNumber
      - clientDob
      - referralSourceHospitalRegion
      - referralReceivedDate
      - supportsProvided
    properties:
      reportingYear:
        type: integer
        example: 2024
        description: The reporting month can't be before March 2024.
      reportingMonth:
        type: integer
        example: 9
        description: The reporting month can't be before March 2024.
      supplierId:
        type: string
        example: "<Supplier ID>"
      claimNumber:
        type: string
        example: AB12345
      clientDob:
        type: string
        format: date
        example: 1977-06-21
      referralSourceHospitalRegion:
        type: string
        enum:
          - ACC
          - Auckland
          - Bay of Plenty
          - Canterbury
          - Capital and Coast
          - Counties Manukau
          - Hawke's Bay
          - Hutt Valley
          - Lakes
          - MidCentral
          - Nelson Marlborough
          - Northland
          - South Canterbury
          - Southern
          - Tairawhiti
          - Taranaki
          - Waikato
          - Wairarapa
          - Waitemata
          - West Coast
          - Whanganui
        example: Capital and Coast
      referralReceivedDate:
        type: string
        format: date
        example: 2024-06-11
        description: This date cannot be before 1 March 2024.
      supportsProvided:
        type: string
        enum:
          - "Yes: Client received supports"
          - "No: Client declined supports"
        example: "Yes: Client received supports"
      requestedStartDate:
        type: string
        format: date
        example: 2024-07-01
        description: "This date cannot be before referralReceivedDate. Required if supportsProvided is 'Yes: Client received supports'."
      servicePlanDate:
        type: string
        format: date
        example: 2024-06-20
        description: "This date cannot be before referralReceivedDate. Required if supportsProvided is 'Yes: Client received supports'."
      packageStartDate:
        type: string
        format: date
        example: 2024-07-01
        description: "This date cannot be before referralReceivedDate. Required if supportsProvided is 'Yes: Client received supports'."
  ServiceCompletion:
    type: object
    required:
      - reportingYear
      - reportingMonth
      - supplierId
      - claimNumber
      - clientDob
      - packageStartDate
      - packageEndDate
      - supportPackageNumber
      - functionalGroup
      - supportWorkerHours
      - supportWorkerVisits
      - goalsMet
      - outcome
    properties:
      reportingYear:
        type: integer
        example: 2024
        description: The reporting month can't be before March 2024.
      reportingMonth:
        type: integer
        example: 9
        description: The reporting month can't be before March 2024.
      supplierId:
        type: string
        example: "<Supplier ID>"
      claimNumber:
        type: string
        example: AB12345
      clientDob:
        type: string
        format: date
        example: 1977-06-21
      packageStartDate:
        type: string
        format: date
        example: 2024-07-01
        description: This date cannot be before 1 March 2024.
      packageEndDate:
        type: string
        format: date
        example: 2024-09-15
        description: This date cannot be before packageStartDate.
      supportPackageNumber:
        type: string
        enum:
          - First
          - Second
          - Third
          - Fourth
        example: First
      functionalGroup:
        type: string
        enum:
          - Functional group 1
          - Functional group 2
          - Functional group 3
          - Functional group 4
          - Childcare only
        example: Functional group 1
      supportWorkerHours:
        type: number
        format: float
        minimum: 0.25
        example: 3.75
        description: Must be rounded to the quarter hour.
      supportWorkerVisits:
        type: integer
        minimum: 1
        example: 2
      goalsMet:
        type: string
        enum:
          - Not achieved
          - Partially achieved
          - Fully achieved
        example: Fully achieved
      outcome:
        type: string
        enum:
          - A further RTI package is required
          - No longer needs HCSRTI support
          - Transferred to MI
          - Other
        example: No longer needs HCSRTI support
  SupplierReview:
    type: object
    required:
      - reportingYear
      - reportingMonth
      - supplierId
      - staffNotQualified
      - staffQualifiedL2
      - staffQualifiedL3
      - staffQualifiedL4OrHigher
      - famOrNomCarers
      - declinedReferrals
      - careHoursDelivered
      - careHoursNotDelivered
      - adverseEventSac1
      - adverseEventSac2
      - complaints
    properties:
      reportingYear:
        type: integer
        example: 2024
        description: The reporting month can't be before March 2024.
      reportingMonth:
        type: integer
        example: 9
        description: The reporting month can't be before March 2024.
      supplierId:
        type: string
        example: "<Supplier ID>"
      staffNotQualified:
        type: integer
        minimum: 0
        example: 1
      staffQualifiedL2:
        type: integer
        minimum: 0
        example: 2
      staffQualifiedL3:
        type: integer
        minimum: 0
        example: 1
      staffQualifiedL4OrHigher:
        type: integer
        minimum: 0
        example: 0
      famOrNomCarers:
        type: integer
        minimum: 0
        example: 1
      declinedReferrals:
        type: integer
        minimum: 0
        example: 1
      careHoursDelivered:
        type: integer
        minimum: 0
        example: 52
      careHoursNotDelivered:
        type: integer
        minimum: 0
        example: 8
      adverseEventSac1:
        type: integer
        minimum: 0
        example: 1
      adverseEventSac2:
        type: integer
        minimum: 0
        example: 0
      adverseEventSac3:
        type: integer
        minimum: 0
        example: 0
      adverseEventSac4:
        type: integer
        minimum: 0
        example: 0
      compliments:
        type: integer
        minimum: 0
        example: 3
      complaints:
        type: integer
        minimum: 0
        example: 1
  IHCSResponse:
    type: object
    properties:
      createdAt:
        type: string
        example: 2024-09-08 11:29:08
      status:
        type: string
        example: Successful
      submittedForm:
        type: object