This guide is for legacy users that respond to incoming Carequality requests on their own.
Review the details about event and document types to get oriented.
As your own responder, you’ll use the ClinicalSummary.Document event types. Check out these API schemas for details about required and optional fields:
The most common and valuable document type for Carequality participants is the Continuity of Care Document (CCD), which has a LOINC code of 34133-9. We recommend making CCDs available to respond to document requests.
You can respond with other document types, but talk to your Technical Account Manager about alternatives first.
- Request a direct connection to Carequality. This is a different process from setting up an onramp to Carequality, where Redox responds to your incoming Carequality requests.
- Go through the steps of setting up an onramp to Carequality, but skip the data on demand steps.
- Set up a standard endpoint URL destination in your system so that you can receive queries from Carequality participants.
- Create and authenticate an API key (or use an existing one) so you can query Carequality.
- Make sure you support these fields for receiving and processing DocumentQuery:
- Patient.Identifiers array (Patient identifier and identifier type should persist to your system as you push patient demographics.)
- all Visit fields
- Document.Types arrayOptional fields
- Make sure you support these fields for responding with DocumentQueryResponse:
- Documents[].ID stringHandling document IDs
- Plan for how to respond with DocumentGetResponse, depending on document type:
- If you plan to respond with non-CCD documents, you must be able to populate these fields for DocumentGetResponse:
- Meta.DataModel and Meta.EventType
- Document.ID
- FileType
- DataOptional fields
- If you plan to respond with CCDs, you can choose to respond either in the traditional format (i.e., XML) or in an alternative format.
- For the traditional format, you must be able to populate the same fields noted for non-CCD documents.
- For the alternative format, you can use the DocumentGetResponse required Meta fields and include the body fields from either VisitPush or PatientPush event types instead.Example: DocumentGetResponse for alternative documentsjson
You must decide how you want to manage and provide documents when Carequality participants request them. You can generate documents in your database either:
- (Recommended) Dynamically, at the time of the query.
- You must generate documents in a performant manner. We also recommend caching the document for a reasonable amount of time for your system (e.g., 24 hours). That way, if the requester asks for it again within a short time, you don’t have to rebuild it.
- The benefit of generating documents dynamically is that the requester doesn’t have to locate one document in a large list. Instead, the specific document they want is generated when they want it.
- Immediately, upon completing a patient visit and retaining the document indefinitely.
- Immediately doesn’t have to be real-time. For example, you could choose to generate documents as part of a nightly batch job.
- Download our Postman collection and staging environment so you can send test requests to validate your system. Learn how to access dev tools.
![Dev Tool downloads are grouped together under the Developer > Test Tools page of the Redox dashboard. Dev Tool downloads are grouped together under the Developer > Test Tools page of the Redox dashboard.]()
Dev tool downloads - When you test, you’re essentially acting as an external Carequality participant querying yourself. You’re free to validate in production too, but it’s not required since you already have the data.
- Send a ClinicalSummary.DocumentQuery with the network patient ID for a test patient to the Redox gateway: 2.16.840.1.113883.3.6147.458.2.
- We resolve it to your local patient ID and forward the request to your configured destination.
- After receiving a DocumentQuery, perform these steps with a Redoxer to validate that you respond successfully (with DocumentQueryResponse). For each of the responses, you include the local document ID, which Redox translates to the network document ID. Confirm that:
- You can respond with a list of all your available documents for the patient with no specific search parameters.
- You can respond with a list of documents filtered down to a specific document type.
- You can respond with a list of documents filtered down to a specific visit date range. Make sure you can support both start/end dates, only start date, and only end date.
- Test whether you can respond for a patient that has no related documents. This helps you define how to handle the interim state between locating a patient and preparing a document.
- Send a ClinicalSummary.DocumentGet with the network document ID to the Redox gateway: 2.16.840.1.113883.3.6147.458.2.
- Redox resolves it to the local document ID and forwards the request to your configured endpoint.
- After receiving the DocumentGet, perform these steps with a Redoxer to validate that you respond successfully. Confirm that:
- You can find a document and return it in the right format—and you receive it back in response to your query.
- You can handle responding with the appropriate error code when you fail to locate a document.
If your system experiences errors while you’re processing incoming requests, you can respond with any of these errors in the body.XDSErrors.code field:
- XDSRepositoryOutOfResources
- XDSRepositoryBusy
- XDSRepositoryError
- XDSUnknownPatientId
Include any extra information you want to relay back to the sender about the error in the body.XDSErrors.message field.
