To search for patient records, you first need to identify organizations that have seen your patient. Then you can request patient documents from those organizations.
If you want to know where you can get patient records from, explore a list of active Carequality participants.
You can also check out test patient data for context on the code examples we provide or for your own testing.
With FHIR®, you can perform a narrow patient search, meaning you can search a specific organization for patient records.
There are two steps for this. However, you can skip step #1 if you already have the organization OID(s):
- Find relevant organizations to search. First, you need to find where the patient’s records may exist. You can use parameters like ZIP code or radius around the patient’s address to find a list of organizations. The response returns a list of matching organization(s) with their OID(s).
- Search for patient records with OID(s). Skip directly to this step if you already have a static list of OID(s) to search. Otherwise, use the results from step #1. Keep in mind you can only search one organization per query.
Each query contains required metadata headers that identify the requesting user and their organization, specify the purpose of use, and direct the request to the target organization.
This table contains the HTTP headers for the relevant metadata when using the Redox FHIR® API to search for patients.
Header | Description | Notes |
---|---|---|
x-sender-organization-id | The OID of your Carequality organization. This specifies that your organization is sending the query. | It helps to be specific if you have multiple levels within your Carequality organization. However, you can also use your organization’s top-level OID. |
x-user-id | Either the name of the user sending the request or the relevant provider. This should be a human-readable identifier and is required for audit purposes. | The provider’s name should still be populated when an automated process runs the query. For example, a provider may have an automated process triggered after completing a patient visit. In that case, the query runs in the background on the provider’s behalf. This isn’t necessary for patient searches with record locator service. |
x-user-role | The role of the user sending the request. | You must use a SNOMED value for this field. Check out the U.S. Health Information knowledge base for a list of available SNOMED values. |
x-purpose-of-use | The purpose of use for this request (e.g., Treatment). | You must qualify for a “Treatment” purpose of use when using Network Onramps. If you have a different purpose of use, other Carequality participants aren't likely to respond. Remember that to be a Carequality participant, you must also push data. |
Parameter | Description | Example |
---|---|---|
_id | The organization OID of a Carequality participant. | 2.16.840.1.113883.3.6147.458.2 |
name | The organization name of a Carequality participant. These aren’t unique values, and you’re not able to search aliases. | redox |
name-searchtype | Used in conjunction with name and designates whether the name search should be contains or exact. This is non-normative but results in one of the search values as defined in FHIR®. Review the HL7 FHIR® spec. | contains |
address-city | Used in conjunction with name-searchtype to perform an exact search for a city. | Madison |
address-state | Used in conjunction with name-searchtype to perform an exact search for a U.S. state. | WI |
address-postalcode | Used in conjunction with name-searchtype to perform an exact search for a ZIP code. | 53703 |
radius | Should be used in conjunction with any of the address-* search parameters. | 50 |
active | The type of patient records to include in the response. By default, this is set to true, which means only active patient records should be returned. If false, deleted records may be included. | false |
index | Where to start searching if paging through patient records. | 0 |
limit | The number of patient records to return in the response payload. | 100 |
You must populate any test queries with the appropriate FHIR® destination slug for the specific type of request:
Query purpose | Destination slug |
---|---|
Query for/create/update/delete an organization | ceq-orgs |
Perform a patient search within a specific organization | ceq-xcpd:{{org-oid-obtained-from-organization-query}} |
Search for a clinical summary/document | ceq-xca:{{org-oid-obtained-from-organization-query}} |
Follow these steps to find organization OIDs of Carequality participants you want to query for patient records. You can skip this section if you already have the organization OIDs you need.
- Send the Organization_search query to search by ZIP code radius or organization name. We recommend including the FHIR® headers we defined above, but it’s not required.FHIR example: Search for organizationsbashAPI reference
- If the request is successful, you receive a synchronous response with the relevant organization results.FHIR Example: Successful response for organization searchjson
- Select one or more organizations from the results list to search.
If you know exactly where a patient was seen previously, you can search for a patient at an individual organization. If you want to search multiple organizations, you must search them one at a time.
- Send the PatientSearch.Query request with the patient’s demographics to see if that organization has your patient’s records. You must use the organization’s OID in the URL of each request.Where to find the OIDFHIR example: Search for a patient within one organizationbashFHIR API reference
- If your search matches a patient at the given organization, the response returns the patient’s identifier and additional details. If a patient isn’t found, the response returns an empty array.FHIR example: Successful response for a patient search within one organizationjson
- Repeat these steps for every organization you want to search.