61.4.1Monitoring P2P Exchanges

 

For each $invoke-export request, Smile will create a Task resource for tracking the progress of the request. The location of the Task resource is returned in the $invoke-export response.

Here is a table of fields in the Task resource and how they support getting more information about system-to-system module operations.

Data Task Field Notes
Task created Task.meta.authoredOn Timestamp.
Task last updated Task.meta.lastUpdated Timestamp.
Task type Task.code Creates a code that can help distinguish data transfer Tasks from other Tasks that may exist in the repository. Useful if you want to query for all system to system module related Tasks.

{
  "code": {
    "coding": [
      {
        "system": "http://hl7.org/fhir/us/davinci-hrex/CodeSystem/hrex-temp",
        "code": "data-request",
        "display": "data request task"
      }
    ]
  }
}
        
Task tag Task.meta.tag Creates a metadata tag that, along with Task.code, can help distinguish data transfer Tasks from other Tasks that may exist in the repository.

{
  "tag": [
    {
      "system": "http://payer-to-payer-exchange/CodeSystem/p2p-internal-codes",
      "code": "CDR_MANAGED",
      "display": "This tag is managed by SmileCDR System to System Module."
    }
  ]
}
        
Task status Task.status Values:
  • Requested: Batch job has been initiated from request.
  • In Progress: Transfer orchestration has begun with external system.
  • Completed: Transfer successful and data stored.
  • Cancelled: Job has been cancelled. (Likely directly in batch job manager.)
  • Failed: Job could not be completed due to error.
Task log Task.note A list of potential log messages.
Authorization record Task.focus Reference to Consent record submitted as part of Member Match request.
Member Task.for Reference to local Patient record.
Source payer Task.owner Need to verify this is completed and whether this may require an independent Organization resource.
Requesting payer Task.requester Organization reference taken from CoverageToLink parameter: Coverage.payor, which should reference an HRex Organization Profile for the requesting payer.
Original resources archived Task.output[type.coding.code="documentreference"].valueReference Unaltered original resources imported by system and stored in DocumentReference resources. See another section.

61.4.2Monitoring Methods

 
MethodDescription
Task Resource QueryQuery FHIR API for Task resources
Smile Web PortalView transactions in Batch Jobs under Runtime

61.4.2.0.1Polling the Export Job

After initiating the export, the server responds with HTTP 202 Accepted and a Location header containing the job URL. Poll this URL to check job status:

GET <export-job-location-url>

Headers:
Authorization: Bearer <access_token>
Accept: application/fhir+json

Notes:

  • Poll the job URL until it completes.
  • Once completed, the response contains NDJSON file URLs for downloaded data.
  • Use reasonable polling intervals to avoid overloading the server.

61.4.3Troubleshooting

 

For troubleshooting related issues, it is recommended to enable logging by adding the logback-smile-custom.xml configuration file in the Smile CDR customerlib folder to obtain more detailed logs.

<logger name="ca.cdr.log.http_troubleshooting" level="DEBUG"/>
<logger name="ca.cdr.log.security_troubleshooting" level="DEBUG"/>
<logger name="ca.uhn.fhir.log.batch_troubleshooting" level="DEBUG"/>
<logger name="ca.cdr.log.s2s_troubleshooting" level="DEBUG"/>

To view the logs, navigate to the log folder in your terminal and run the command tail -f cdr.log

For additional guidance, refer to the following documentation: