Matching and Part 2
Patient aliases
A Query response may contain multiple result rows, one per patient alias.
When a NYeC match produces multiple result rows, the current integration excludes the first row (results[0], the original query result) from Retrieve processing and processes the matched alias rows that follow (results[1..n]). Deduplicate returned documents using QE + documentUri.
| Rows | Meaning | Use for Retrieve |
|---|---|---|
results[0] | Original query result | Not when a NYeC match is present |
results[1..n] | Matched patient aliases | Yes. Process DocumentReferences and deduplicate |
The source describes this as the current integration behavior. Whether it is a guaranteed API contract is unconfirmed and needs PDR engineering review.
Part 2 content
Part 2 is explicit. A standard query does not implicitly include Part 2 content. Set part2: true to request the Part 2 path.
{
"qe": "HECDCS",
"assigningAuthority": "AUBURN-COMMUNITY",
"mrn": "PDRTEST-P2-HECDCS-QA04",
"docTypes": ["CCD", "Lab", "Rad", "TRN"],
"part2": true
}
Returned DocumentReferences may carry sensitivity labels such as SUD, MH-U and DVD-U. The example below is illustrative. No Part 2 test patient currently returns documents in QA, and a Part 2 query for the registered patient above returns HTTP 200 with 0 documents:
View synthetic Part 2 DocumentReference
{
"resourceType": "DocumentReference",
"id": "c3effbae-9ae8-5a85-ab5e-3713a04d5ed3",
"author": [
{
"display": "AUBURN-COMMUNITY",
"reference": "Organization/3ff6768f-7b67-55b7-96b6-4fb6cbef6394"
}
],
"content": [
{
"attachment": {
"title": "MDM^T02",
"url": "s3://nyec-pdr-qa-healtheconnections-part2/AUBURN-COMMUNITY/trn/2026/Sep/17/13/healtheconnections_AUBURN-COMMUNITY_5b7f11802df7094653e781456761fcbbd7c3e578f88bb4c00d9fef34e0bcd4a9_PDRTEST-P2-HECDCS-20260917-0007-TRN.hl7"
}
}
],
"securityLabel": [
{
"coding": [
{
"code": "SUD",
"display": "substance use disorder information sensitivity",
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode"
}
]
},
{
"coding": [
{
"code": "MH-U",
"display": "Unknown mental health information sensitivity",
"system": "http://healtheconnections.org/CodeSystem/v3-ActCode"
}
]
},
{
"coding": [
{
"code": "DVD-U",
"display": "Unknown developmental disability information sensitivity",
"system": "http://healtheconnections.org/CodeSystem/v3-ActCode"
}
]
}
],
"status": "current",
"subject": {
"display": "PDRTEST-P2-HECDCS-20260917-0007",
"reference": "Patient/cbf8d088-be85-5e83-9fc2-3ac7b4514fc8"
},
"type": {
"coding": [
{
"code": "MDM_T02",
"display": "MDM_T02",
"system": "http://healtheconnections.org/fhir/CodeSystem/document-type"
},
{
"code": "TRN",
"display": "TRN",
"system": "http://healtheconnections.org/fhir/CodeSystem/input-document-type"
}
],
"text": "MDM^T02"
}
}
To exercise this path, see the Part 2 scenario in QA scenarios.