P2P Execute Exchange

 

Overview

This is a custom operation Smile created to streamline the $member-match and $export process as a single operation for the Requesting Payer. The $sdh.s2s.invoke-export endpoint kicks off a server-to-server exchange of patient records between two PDex compliant servers. This operation initiates from the requesting system side.

What $invoke-export Does

 

This Smile CDR operation executes the following activities:

  1. Authenticates with source payer system.
  2. Queries $member-match to locate patient record.
  3. Executes bulk data export via $export operation.
  4. Stores and links retrieved files to local patient record.
  5. Creates Task resource for tracking status and output.

Sample Request

Endpoint

POST {base}/Patient/$sdh.s2s.invoke-export

Request Body

Parameters resource containing:

ParameterTypeRequiredDescription
localPatientreferenceYesReference to local Patient resource
sourceIssuerUrlstringYesIssuer URL from OIDC Server Definition
memberMatchParameterYesContains MemberPatient, CoverageToMatch, Consent
exportParameterYesExport parameters (_type, _since, etc.)

Example Request

POST https://requesting-payer.example.com/Patient/$sdh.s2s.invoke-export
Content-Type: application/fhir+json

{
  "resourceType": "Parameters",
  "parameter": [
    {
      "name": "export",
      "resource": {
        "resourceType": "Parameters",
        "parameter": [
          {
            "name": "_outputFormat",
            "valueString": "application/fhir+ndjson"
          },
          {
            "name": "_type",
            "valueString": "Patient, Observation, Appointment"
          }
        ]
      }
    },
    {
      "name": "localPatient",
      "valueReference": {
        "reference": "Patient/local-123"
      }
    },
    {
      "name": "sourceIssuerUrl",
      "valueString": "https://source-payer.example.com"
    },
    {
      "name": "memberMatch",
      "part": [
        {
          "name": "MemberPatient",
          "resource": {
            "resourceType": "Patient",
            "name": [{"family": "Smith", "given": ["John"]}],
            "birthDate": "1980-01-01"
          }
        },
        {
          "name": "CoverageToMatch",
          "resource": {
            "resourceType": "Coverage",
            "identifier": [{
              "system": "http://source-payer.example.com/member-id",
              "value": "MEM-98765"
            }]
          }
        },
        {
          "name": "Consent",
          "resource": {
            "resourceType": "Consent",
            "policy": [{
              "uri": "hrex-consent.html#regular"
            }]
          }
        }
      ]
    }
  ]
}

Success Response

Status: 200 OK

Headers:

Content-Location: Task/p2p-task-ab123

Body:

No response body.

Note: Export jobs can take time to process.