Finance and Insurance Service (FAIS)
1.0.1-current - ci-build International flag

Finance and Insurance Service (FAIS), published by IHE IT Infrastructure Technical Committee. This guide is not an authorized publication; it is the continuous build for version 1.0.1-current built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/IHE/ITI.Finance/ and changes regularly. See the Directory of published versions

Test Plan

This Test Plan page is a prototype. We expect the maturity of the content will improve over time. For now, we summarize high level testing scope and available tools. Comments are welcome.

Introduction

Overall test plan leverages the Profiles and Examples shown on the Artifacts Summary page. The Profiles listed are describing the constraints that would be adhered to by actors claiming conformance to this implementation guide. Thus, any applicable Resources that are known to have been published by an app or server MUST be conformant to these Profiles as appropriate.

The Examples listed in Example Instances are example instances. Some are conformant to the Profiles. Other examples that either assist with the structure of the examples (e.g., Patient and Encounter) or are examples that should be able to handle in various ways.

The tests below are described using Gherkin syntax.

High-level Test Scope

Query Insurance Plan [ITI-121]

The Beneficiary Requestor initiates a request to search for or read an insurance on the Beneficiary Manager. The Beneficiary Manager responds to the request and returns an insurance plan to the Beneficiary Requestor. See Test Definition.

ITI-121 Query Insurance Plan Test

Feature: Test ITI-121 Transaction: Query Insurance Plan

  Background:
    * url 'http://localhost/fhir'
    * def planresource read('InsurancePlan-ex-insuranceplan-1.json')

  Rule: Search Insurance Plan Request and Response Messages initiated from a Beneficiary Requestor to a Beneficiary Manager

    Scenario: Search for an Insurance Plan

      Given path 'InsurancePlan'
      And request { type: 'medical' }
      When method get
      Then status 200
      And match $.resourceType = 'Bundle'
      And match $.type = 'searchset'
      And match $.entry contains planresource

  Rule: Read Insurance Plan Request and Response Messages initiated from a Beneficiary Requestor to a Beneficiary Manager

    Scenario: Request an Insurance Plan resource 

      Given path 'InsurancePlan/ex-insuranceplan-1'
      When method get
      Then status 200
      And match $.resourceType == 'InsurancePlan'
      And match $.status == "active"
      And match $.name = "National Health Insurance Scheme"
  

Enroll Beneficiary [ITI-122]

The Beneficiary Requestor initiates a request to enroll a beneficiary on the Beneficiary Manager. The Beneficiary Manager responds to an enrollment request and returns an enrollment response to the Beneficiary Requestor. See Test Definition.

ITI-122 Enroll Beneficiary Test

Feature: Test ITI-122 Transaction: Enroll Beneficiary

  Background:
    * url 'http://localhost/fhir'

  Rule: Enroll Beneficiary Request and Response Messages initiated from a Beneficiary Requestor to a Beneficiary Manager

    Scenario: Enroll a Beneficiary without referenced content

      Given path 'EnrollmentRequest/$submit'
      And request read('EnrollmentRequest-ex-enrollment-req.json')
      When method post
      Then status 200
      And match $.resourceType = "EnrollmentResponse"
      And match $ contains status
      And match $ contains request
      And match $ contains outcome

    Scenario: Enroll a Beneficiary with referenced content in a bundle

      Given path 'EnrollmentRequest/$submit'
      And request read('Bundle-ex-enreq-bundle.json')
      When method post
      Then status 200
      And match $.resourceType == "Bundle"
      And match $.type == "collection"
      And match contains $.entry[?(@.resourceType == 'EnrollmentResponse' && @.status && @.request && @.outcome)]
  

Check Enrollment Status [ITI-123]

The Beneficiary Requestor initiates a query on an enrollment response on the Beneficiary Manager. The Beneficiary Manager responds to the enrollment response request and returns an enrollment response to the Beneficiary Requestor. See Test Definition.

ITI-123 Check Enrollment Status Test

Feature: Test ITI-123 Transaction: Check Enrollment Status

  Background:
    * url 'http://localhost/fhir'
    * def responseresource read('EnrollmentResponse-ex-enrollment-resp-1.json')

  Rule: Search Enrollment Response Request and Response Messages initiated from a Beneficiary Requestor to a Beneficiary Manager

    Scenario: Search for an Enrollment Response

      Given path 'EnrollmentResponse'
      And request { status: 'active' }
      When method get
      Then status 200
      And match $.resourceType = 'Bundle'
      And match $.type = 'searchset'
      And match $.entry contains responseresource

  Rule: Read Enrollment Response Request and Response Messages initiated from a Beneficiary Requestor to a Beneficiary Manager

    Scenario: Request an Enrollment Response resource 

      Given path 'EnrollmentResponse/ex-enrollment-resp-1'
      When method get
      Then status 200
      And match $.resourceType == 'EnrollmentResponse'
      And match $.outcome == "complete"
      And match $.request.reference == "EnrollmentRequest/ex-enrollment-req-1"
  

Check Coverage Eligibility [ITI-124]

The Coverage Requestor initiates a request to check coverage eligibility on the Claims Manager. The Claims Manager responds to an eligibility request and returns a coverage eligibility response to the Coverage Requestor. See Test Definition.

ITI-124 Check Coverage Eligibility Test

Feature: Test ITI-124 Transaction: Check Coverage Eligibility

  Background:
    * url 'http://localhost/fhir'

  Rule: Check Coverage Eligibility Request and Response Messages initiated from a Coverage Requestor to a Claims Manager

    Scenario: Check Coverage Eligibility without referenced content

      Given path 'CoverageEligibilityRequest/$submit'
      And request read('CoverageEligibilityRequest-ex-check-coverage-2.json')
      When method post
      Then status 200
      And match $.resourceType = "CoverageEligibilityResponse"
      And match $ contains status
      And match $ contains request
      And match $ contains outcome

    Scenario: Check Coverage Eligibility with referenced content in a bundle

      Given path 'CoverageEligibilityRequest/$submit'
      And request read('Bundle-ex-check-coverage-bundle-2.json')
      When method post
      Then status 200
      And match $.resourceType == "Bundle"
      And match $.type == "collection"
      And match contains $.entry[?(@.resourceType == 'CoverageEligibilityResponse' && @.status && @.request && @.outcome)]
  

Check Coverage Eligibility Status [ITI-125]

The Coverage Requestor initiates a request to retrieve a coverage eligibility response on the Claims Manager. The Claims Manager returns a coverage eligibility response to the Coverage Requestor. See Test Definition.

ITI-125 Check Coverage Eligibility Status Test

Feature: Test ITI-125 Transaction: Check Coverage Eligibility Status

  Background:
    * url 'http://localhost/fhir'
    * def responseresource read('CoverageEligibilityResponse-ex-check-coverage-resp-2.json')

  Rule: Search Coverage Eligibility Response Request and Response Messages initiated from a Coverage Requestor to a Claims Manager

    Scenario: Search for a Coverage Eligibility Response

      Given path 'CoverageEligibilityResponse'
      And request { status: 'active' }
      When method get
      Then status 200
      And match $.resourceType = 'Bundle'
      And match $.type = 'searchset'
      And match $.entry contains responseresource

  Rule: Read Coverage Eligibility Response Request and Response Messages initiated from a Coverage Requestor to a Claims Manager

    Scenario: Request a Coverage Eligibility Response resource 

      Given path 'CoverageEligibilityResponse/ex-check-coverage-resp-2'
      When method get
      Then status 200
      And match $.resourceType == 'EnrollmentResponse'
      And match $.outcome == "complete"
      And match $.request.reference == "CoverageEligibilityRequest/ex-check-coverage-2"
  

Submit Claim [ITI-126]

The Claims Requestor initiates a request to submit a claim on the Claims Manager. The Claims Manager responds to a claim submission and returns a claim response to the Claims Requestor. See Test Definition.

ITI-126 Submit Claim Test

Feature: Test ITI-126 Transaction: Submit Claim
  Background:
    * url 'http://localhost/fhir'

  Rule: Submit Claim Request and Response Messages initiated from a Claims Requestor to a Claims Manager

    Scenario: Submit Claim without referenced content

      Given path 'Claim/$submit'
      And request read('Claim-ex-claim-3.json')
      When method post
      Then status 200
      And match $.resourceType = "ClaimResponse"
      And match $ contains status
      And match $ contains request
      And match $ contains outcome

    Scenario: Submit Claim with referenced content in a bundle

      Given path 'Claim/$submit'
      And request read('Bundle-ex-claim-bundle-3.json')
      When method post
      Then status 200
      And match $.resourceType == "Bundle"
      And match $.type == "collection"
      And match contains $.entry[?(@.resourceType == 'ClaimResponse' && @.status && @.request && @.outcome)]
  

Cancel Claim [ITI-127]

The Claims Requestor initiates a request to cancel a claim on the Claims Manager. The Claims Manager responds to a claim cancellation and returns a claim response to the Claims Requestor. See Test Definition.

ITI-127 Cancel Claim Test

Feature: Test ITI-127 Transaction: Cancel Claim
  Background:
    * url 'http://localhost/fhir'

  Rule: Cancel Claim Request and Response Messages initiated from a Claims Requestor to a Claims Manager

    Scenario: Cancel Claim without referenced content

      Given path 'Claim/ex-claim-3/$cancel'
      When method get
      Then status 200
      And match $.resourceType = "ClaimResponse"
      And match $ contains status
      And match $ contains request
      And match $ contains outcome

    Scenario: Cancel Claim with referenced content in a bundle

      Given path 'Claim/ex-claim-3/$cancel'
      When method get
      Then status 200
      And match $.resourceType == "Bundle"
      And match $.type == "collection"
      And match contains $.entry[?(@.resourceType == 'ClaimResponse' && @.status && @.request && @.outcome)]
  

Re-process Claim [ITI-128]

The Claims Requestor initiates a request to re-process a claim on the Claims Manager. The Claims Manager responds to a claim re-process request and returns a claim response to the Claims Requestor. See Test Definition.

ITI-128 Re-process Claim Test

Feature: Test ITI-128 Transaction: Submit Claim
  Background:
    * url 'http://localhost/fhir'

  Rule: Re-process Claim Request and Response Messages initiated from a Claims Requestor to a Claims Manager

    Scenario: Re-process Claim without referenced content

      Given path 'Claim/$reprocess'
      When method post
      Then status 200
      And match $.resourceType = "ClaimResponse"
      And match $ contains status
      And match $ contains request
      And match $ contains outcome

    Scenario: Re-process Claim with referenced content in a bundle

      Given path 'Claim/$reprocess'
      When method post
      Then status 200
      And match $.resourceType == "Bundle"
      And match $.type == "collection"
      And match contains $.entry[?(@.resourceType == 'ClaimResponse' && @.status && @.request && @.outcome)]
  

Track Claim [ITI-129]

The Claims Requestor initiates a request to retrieve a claim response on the Claims Manager. The Claims Manager returns a claim response to the Claims Requestor. See Test Definition.

ITI-129 Track Claim Test

Feature: Test ITI-129 Transaction: Track Claim

  Background:
    * url 'http://localhost/fhir'
    * def responseresource read('CoverageEligibilityResponse-ex-claim-response-acc-3.json')

  Rule: Search Claim Response Request and Response Messages initiated from a Claims Requestor to a Claims Manager

    Scenario: Search for a Claim Response

      Given path 'ClaimResponse'
      And request { status: 'active' }
      When method get
      Then status 200
      And match $.resourceType = 'Bundle'
      And match $.type = 'searchset'
      And match $.entry contains responseresource

  Rule: Read Claim Response Request and Response Messages initiated from a Claims Requestor to a Claims Manager

    Scenario: Request a Claim Response resource 

      Given path 'ClaimResponse/ex-claim-response-acc-3'
      When method get
      Then status 200
      And match $.resourceType == 'ClaimResponse'
      And match $.outcome == "complete"
      And match $.request.reference == "Claim/ex-claim-3"