Stream: implementers
Topic: Search by participating-organization
Tushar Nair (Feb 16 2021 at 20:48):
Hello,
I am trying to fetch all OrganizationAffiliation resources referring a specific participatingOrganization. The name of the participatingOrganization is - Burr Clinic. The id for this participating-organization is 721 in the fhir server. So I am using the following query in the HAPI FHIR server - http://127.0.0.1:12443/fhir-server/R4/OrganizationAffiliation?participating-organization=721. But it returns no result:
resourceType": "Bundle",
"id": "25cb5bc4-bf90-4aba-a4df-31abe734a7fa",
"meta": {
"lastUpdated": "2021-02-16T12:43:44.616-08:00"
},
"type": "searchset",
"total": 0,
"link": [
{
"relation": "self",
"url": "http://127.0.0.1:12443/fhir-server/R4/OrganizationAffiliation?participating-organization=721"
}
But when I use the following query - http://127.0.0.1:12443/fhir-server/R4/OrganizationAffiliation?participating-organization=BurrClinic , I get a proper result:
{
"resourceType": "Bundle",
"id": "6822fc60-a8d9-4dfc-a825-2e35376294ce",
"meta": {
"lastUpdated": "2021-02-16T12:45:28.742-08:00"
},
"type": "searchset",
"total": 2,
"link": [
{
"relation": "self",
"url": "http://127.0.0.1:12443/fhir-server/R4/OrganizationAffiliation?participating-organization=BurrClinic"
}
],
"entry": [
{
"fullUrl": "http://127.0.0.1:12443/fhir-server/R4/OrganizationAffiliation/701",
"resource": {
"resourceType": "OrganizationAffiliation",
"id": "701",
"meta": {
"versionId": "1",
"lastUpdated": "2021-02-16T11:40:14.128-08:00",
"source": "#LKJTnQn5xjp8rENR",
"profile": [
"http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/plannet-OrganizationAffiliation"
]
},
"language": "en-US",
"text": {
"status": "generated",
"div": "<div xml:lang=\"en-US\" xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en-US\"><p><b>Generated Narrative</b></p><p><b>active</b>: true</p><p><b>organization</b>: <a href=\"Organization-Hospital.html\">Generated Summary: language: en-US; id: NPI456; active; <span title=\"Codes: {http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/OrgTypeCS fac}\">Facility</span>; name: Hartford General Hospital; Phone: (111)-222-3333, https://www.hartfordgeneralhos...</a></p><p><b>participatingOrganization</b>: <a href=\"Organization-BurrClinic.html\">Generated Summary: language: en-US; id: NPI999; active; <span title=\"Codes: {http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/OrgTypeCS fac}\">Facility</span>; name: Burr Clinic; Phone: (111)-222-3333, https://www.burrclinic.com</a></p><p><b>network</b>: <a href=\"Organization-AcmeofCTStdNet.html\">Generated Summary: language: en-US; active; <span title=\"Codes: {http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/OrgTypeCS ntwk}\">Network</span>; name: ACME CT Preferred Provider Network</a></p><p><b>code</b>: <span title=\"Codes: {http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/OrganizationAffiliationRoleCS outpatient}\">Clinic or Outpatient Facility</span></p><p><b>location</b>: <a href=\"Location-HospLoc2.html\">Generated Summary: language: en-US; status: active; name: Hartford Hospital Location 2; <span title=\"Codes: {http://terminology.hl7.org/CodeSystem/v3-RoleCode HOSP}\">Hospital</span>; Phone: (111)-222-3333, https://www.hgh.com</a></p><p><b>healthcareService</b>: <a href=\"HealthcareService-BurrClinicServices.html\">Generated Summary: language: en-US; active; <span title=\"Codes: {http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/HealthcareServiceCategoryCS outpat}\">Clinic or Outpatient Facility</span>; <span title=\"Codes: {http://nucc.org/provider-taxonomy 207Q00000X}\">Family Medicine</span></a></p></div>"
},
"active": true,
"organization": {
"reference": "Organization/Hospital"
},
"participatingOrganization": {
"reference": "Organization/BurrClinic"
},
"network": [
{
"reference": "Organization/AcmeofCTStdNet"
}
],
"code": [
{
"coding": [
{
"system": "http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/OrganizationAffiliationRoleCS",
"code": "outpatient"
}
]
}
],
"location": [
{
"reference": "Location/HospLoc2"
}
],
"healthcareService": [
{
"reference": "HealthcareService/BurrClinicServices"
}
]
},
"search": {
"mode": "match"
}
},
{
"fullUrl": "http://127.0.0.1:12443/fhir-server/R4/OrganizationAffiliation/712",
"resource": {
"resourceType": "OrganizationAffiliation",
"id": "712",
"meta": {
"versionId": "1",
"lastUpdated": "2021-02-16T11:42:32.036-08:00",
"source": "#ud4ZnCXKmwTuVtNS",
"profile": [
"http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/plannet-OrganizationAffiliation"
]
},
"language": "en-US",
"text": {
"status": "generated",
"div": "<div xml:lang=\"en-US\" xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en-US\"><p><b>Generated Narrative</b></p><p><b>active</b>: true</p><p><b>organization</b>: <a href=\"Organization-ConnHIE.html\">Generated Summary: language: en-US; active; <span title=\"Codes: {http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/OrgTypeCS atyprv}\">Atypical Provider</span>; name: Connecticut HIE; Phone: (111)-222-3333, https://www.connhie.com</a></p><p><b>participatingOrganization</b>: <a href=\"Organization-BurrClinic.html\">Generated Summary: language: en-US; id: NPI999; active; <span title=\"Codes: {http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/OrgTypeCS fac}\">Facility</span>; name: Burr Clinic; Phone: (111)-222-3333, https://www.burrclinic.com</a></p><p><b>code</b>: <span title=\"Codes: {http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/OrganizationAffiliationRoleCS bt}\">Member Of</span></p></div>"
},
"active": true,
"organization": {
"reference": "Organization/ConnHIE"
},
"participatingOrganization": {
"reference": "Organization/BurrClinic"
},
"code": [
{
"coding": [
{
"system": "http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/OrganizationAffiliationRoleCS",
"code": "bt"
}
]
}
]
},
"search": {
"mode": "match"
}
}
]
}
Please note that the Organization.name = 'Burr Clinic' and NOT 'BurrClinic'. Wile posting this resource the id used was BurrClinic but the server assigned its own id which was 721. Iam not sure why its not accepting the query when I use id=721. I would be grateful if someone could shed light on this. Thank you in advance.
Lloyd McKenzie (Feb 16 2021 at 21:17):
When you look at the instances, you see this:
"participatingOrganization": {
"reference": "Organization/BurrClinic"
},
Lloyd McKenzie (Feb 16 2021 at 21:17):
That means that the id of the resource being reference by those OrganizationAffiliation records is BurrClinic
Lloyd McKenzie (Feb 16 2021 at 21:18):
It's possible that there's a disconnect between the ids of things in the Organization endpoint vs. in the OrganizationAffiliation endpoint - FHIR doesn't guarantee referential integrity.
Tushar Nair (Feb 16 2021 at 21:41):
Lloyd McKenzie thank you so much !!!
Last updated: Apr 12 2022 at 19:14 UTC