61.3.1P2P Execute Exchange

 

61.3.1.1Overview

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.

61.3.2What $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.

61.3.2.1Sample Request

61.3.2.1.1Endpoint

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

61.3.2.1.2Request Body

Parameters resource containing:

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

61.3.2.1.3Example Request

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

{
  "resourceType": "Parameters",
  "parameter": [
    {
      "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"
            }]
          }
        }
      ]
    }
  ]
}

61.3.2.2Success Response

Status: 200 OK

Headers:

Content-Location: Task/p2p-task-ab123

Body:

{
  "resourceType": "Task",
  "id": "p2p-task-ab123",
  "status": "requested",
  "code": {
    "coding": [{
      "system": "http://hl7.org/fhir/us/davinci-hrex/CodeSystem/hrex-temp",
      "code": "data-request"
    }]
  },
  "for": {
    "reference": "Patient/local-123"
  }
}

Note: Export jobs can take time to process.