# title
Provider Access Version 2 Capability Statement

# publisher
HL7 International / Financial Management

# contact[].name
HL7 International / Financial Management

# description
This Section describes the expected capabilities of the DaVinci PDex Provider Access Server hosted by the Host Plan. The server supports asynchronous `$provider-member-match` (HRex-derived) and `$davinci-data-export` operations on the Group resource to enable provider access to member clinical data via PDex.

# rest[].documentation
The PDex Provider Access Server (Host Plan) **SHALL**:

1. Support `read` and `search-type` interactions on the Group resource for Provider Access discovery.
2. Support the `$provider-member-match` operation at the Group type level to asynchronously match a requested member to a Group; the operation returns a Task and exposes a status URL and a response URL for the client to poll and retrieve results.
3. Support the `$davinci-data-export` operation at the Group instance level to initiate a bulk export of provider-attributed member data; the operation returns a Task and exposes a status URL and a downloadable file URL.
4. Implement the RESTful behavior according to the FHIR specification for bulk asynchronous access.
5. Return the following response classes:
   - (Status 400): invalid parameter
   - (Status 401/4xx): unauthorized request
   - (Status 403): insufficient scope
   - (Status 404): unknown resource
   - (Status 410): deleted resource.
6. Support JSON source formats for all interactions.

# rest[].security.description
1. Access **SHALL** be controlled using client credentials compliant with SMART-on-FHIR Backend Services (system-level scopes).
2. A server **SHALL** reject any unauthorized requests by returning an `HTTP 401` unauthorized response code.

# rest[].resource[].interaction[].documentation
Allows discovery of existing Groups. SHOULD be limited to groups a requestor is permitted to access.

# rest[].resource[].interaction[].documentation
Allows retrieval of a specific Group resource by id.

# rest[].resource[].searchParam[].documentation
The client **SHALL** provide at least a code value and **MAY** provide both the system and code values.

The server **SHALL** support both.

# rest[].resource[].searchParam[].documentation
A common characteristic of all members of a Group.

# rest[].resource[].searchParam[].documentation
Search for Group resources by Group.code (kind of group). Servers **SHALL** support both `multipleOr` and `multipleAnd` semantics on this parameter.

# rest[].resource[].operation[].documentation
Type-level asynchronous member match. Client POSTs `Group/$provider-member-match` with a Parameters body containing the requested member demographics, coverage, and consent. Server returns a Task; client polls `Group/provider-member-match-status/{task_id}` and retrieves results from `Group/$provider-member-match/response/{task_id}`.

# rest[].resource[].operation[].documentation
Instance-level bulk export. Client calls `Group/{group_id}/$davinci-data-export` to initiate an export Task. Status is polled at `Group/$davinci-data-export/status/{task_id}` and resulting files are downloaded via `download/{token}`.

# rest[].resource[].operation[].documentation
Async polling endpoint returned via Content-Location after `$davinci-data-export`. Client GETs `Group/$davinci-data-export/status/{task_id}` to check Task progress and retrieve the export manifest.

# rest[].resource[].operation[].documentation
File download endpoint listed in the export manifest. Client GETs `download/{token}` to retrieve a single ndjson file produced by `$davinci-data-export`.

# rest[].resource[].operation[].documentation
Async polling endpoint returned via Content-Location after `$provider-member-match`. Client GETs `Group/provider-member-match-status/{task_id}` to check Task progress.

# rest[].resource[].operation[].documentation
Result-retrieval endpoint returned by the member-match status manifest. Client GETs `Group/$provider-member-match/response/{task_id}` to fetch matched Group resources.