# Get Care Plan - Breast Screening NZ FHIR Implementation Guide v1.1.0

* [**Table of Contents**](toc.md)
* **Get Care Plan**

## Get Care Plan

### Get BSA CarePlan for Patient

This is typically used to get BSA screening enrolment and pathway status for a participant.

#### Get BSA CarePlan for Patient processing steps:

1. A FHIR Client sends a GET request to the BSA**CarePlan**endpoint with the 'patient' query parameter specifying the patient's NHI number
1. The request is validated - ALT: Validation failure. Operation Outcome resource returned
1. CarePlans for this NHI are retrieved from BSA
1. A bundle of CarePlan resources is returned to the client

#### Get BSA CarePlans Response Example

[get-careplan-response-message-1](Bundle-CPB1.json.md)

#### Get BSA CarePlans Error Example

[get-careplan-error-message-1](OperationOutcome-E1.json.md)

### Search BSA CarePlan

This is used to find all CarePlans filtered by status, category, date or a combination.

#### Get BSA CarePlan for Patient processing steps:

1. A FHIR Client sends a GET request to the BSA**CarePlan**endpoint with some combination of the 'status' 'category' and 'date' parameters
1. The request is validated - ALT: Validation failure. Operation Outcome resource returned
1. CarePlans for this NHI are retrieved from BSA
1. A bundle of CarePlan resources is returned to the client

### Get and Search CarePlan for Patient - Business Rules and Errors

* Business Rule: Must be a valid search parameter
  * HTTP error: 400 Bad request
  * Error code: processing
  * diagnostic: HAPI-0524: Unknown search parameter <x> for resource type \"DiagnosticReport\". Valid search parameters for this search are: ....
* Business Rule: Must be a valid search parameter value
  * HTTP error: 400 Bad request
  * Error code: not-supported
  * diagnostic: Invalid request: The FHIR endpoint on this server does not know how to handle GET operation[DiagnosticReport/DiagnosticReport] with parameters <x>

