Unable to use search parameters on resources imported via bulk import
See original GitHub issueDescribe the bug When I import a resource using the bulk import feature, I am unable to perform a search on this resource. The resource seems to be correctly imported though since it can be retrieved by its id or in the list of its resource type.
Everything works when the resource is created via a simple POST on the API.
To Reproduce
- Import the following ndjson file containing one Patient resource
{"resourceType":"Patient","id":"1772b6bb75a-fd1b2296-6666-4ac1-8b06-f3651eebcc0a","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"]},"text":{"status":"generated","div":"<div xmlns=\"http://www.w3.org/1999/xhtml\">Generated by <a href=\"https://github.com/synthetichealth/synthea\">Synthea</a>.Version identifier: master-branch-latest\n . Person seed: 7504591771487461664 Population seed: 1604158140419</div>"},"extension":[{"url":"http://hl7.org/fhir/us/core/StructureDefinition/us-core-race","extension":[{"url":"ombCategory","valueCoding":{"system":"urn:oid:2.16.840.1.113883.6.238","code":"2106-3","display":"White"}},{"url":"text","valueString":"White"}]},{"url":"http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity","extension":[{"url":"ombCategory","valueCoding":{"system":"urn:oid:2.16.840.1.113883.6.238","code":"2186-5","display":"Non Hispanic or Latino"}},{"url":"text","valueString":"Non Hispanic or Latino"}]},{"url":"http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName","valueString":"Librada521 Cassin499"},{"url":"http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex","valueCode":"M"},{"url":"http://hl7.org/fhir/StructureDefinition/patient-birthPlace","valueAddress":{"city":"Lynn","state":"Massachusetts","country":"US"}},{"url":"http://synthetichealth.github.io/synthea/disability-adjusted-life-years","valueDecimal":2.039551033112163},{"url":"http://synthetichealth.github.io/synthea/quality-adjusted-life-years","valueDecimal":58.96044896688784}],"identifier":[{"system":"https://github.com/synthetichealth/synthea","value":"05f7fb9c-3358-e686-d1ff-a6de1aa2aaf7"},{"type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0203","code":"MR","display":"Medical Record Number"}],"text":"Medical Record Number"},"system":"http://hospital.smarthealthit.org","value":"05f7fb9c-3358-e686-d1ff-a6de1aa2aaf7"},{"type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0203","code":"SS","display":"Social Security Number"}],"text":"Social Security Number"},"system":"http://hl7.org/fhir/sid/us-ssn","value":"999-32-8982"},{"type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0203","code":"DL","display":"Driver's License"}],"text":"Driver's License"},"system":"urn:oid:2.16.840.1.113883.4.3.25","value":"S99935913"},{"type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0203","code":"PPN","display":"Passport Number"}],"text":"Passport Number"},"system":"http://standardhealthrecord.org/fhir/StructureDefinition/passportNumber","value":"X71919634X"}],"name":[{"use":"official","family":"Volkman526","given":["Abdul218"],"prefix":["Mr."]}],"telecom":[{"system":"phone","value":"555-341-1712","use":"home"}],"gender":"male","birthDate":"1958-08-31","address":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/geolocation","extension":[{"url":"latitude","valueDecimal":42.06848443888001},{"url":"longitude","valueDecimal":-70.18801548971284}]}],"line":["405 Schmitt Knoll Unit 25"],"city":"Provincetown","state":"MA","country":"US"}],"maritalStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-MaritalStatus","code":"M","display":"M"}],"text":"M"},"multipleBirthBoolean":false,"communication":[{"language":{"coding":[{"system":"urn:ietf:bcp:47","code":"en-US","display":"English"}],"text":"English"}}]}
- Request a bulk import of this file
curl -k -v -u "fhiruser:change-password" -H 'Content-Type: application/fhir+json' 'https://localhost:9443/fhir-server/api/v4/$import' -d "{
\"resourceType\": \"Parameters\",
\"id\": \"30321130-5032-49fb-be54-9b8b82b2445a\",
\"parameter\": [
{
\"name\": \"inputFormat\",
\"valueString\": \"application/fhir+ndjson\"
},
{
\"name\": \"inputSource\",
\"valueUri\": \"https://localhost:9443/source-fhir-server\"
},
{
\"name\": \"input\",
\"part\": [
{
\"name\": \"type\",
\"valueString\": \"Patient\"
},
{
\"name\": \"url\",
\"valueUrl\": \"https://webserv:8080/Patient.fhir.ndjson\"
}
]
},
{
\"name\": \"storageDetail\",
\"valueString\": \"https\"
}
]
}"
- Search male patients
curl -X GET "https://localhost:9443/fhir-server/api/v4/Patient?gender=male" -H "accept: application/fhir+json"
The API returns :
{
"resourceType": "Bundle",
"id": "16312f11-49c7-4297-9a34-659ee1428052",
"type": "searchset",
"total": 0,
"link": [
{
"relation": "self",
"url": "https://localhost:9443/fhir-server/api/v4/Patient?_count=10&gender=male&_page=1"
}
]
}
Expected behavior The request should returns the resource in the result
Additional context I am using ibmcom/ibm-fhir-server:4.5.4 Docker image
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Bulk Import Troubleshooting Issues - Oracle Help Center
If you selected Import Bulk Data into ERP Cloud Application on the Actions page, you can specify the import job to import on...
Read more >Bulk import data with the GraphQL Admin API
Using the GraphQL Admin API, you can bulk import large volumes of data asychronously. ... parameters : The parameters that you use to...
Read more >BULK INSERT (Transact-SQL) - SQL Server - Microsoft Learn
Specifies that BULK INSERT performs the import operation using the specified data-file type value. Character format. For more information, see ...
Read more >Managing Import Profiles - Ex Libris Knowledge Center
Overview and configuration instructions for creating, editing, copying, and deleting import profiles that enable you to retrieve records ...
Read more >Importing and Working with CSV Files in SQL Server
Simply close the CSV file and/or any other application that has access to the CSV file, go to the previous screen and click...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@tevariou I missed the resource in the original post. Thanks for the bug, I’ll look at it.
Second issue was the CacheSynchronization beforeCompletion wasn’t registered since the transaction was in progress. The PR addresses this issue, and may need an alternative implementation based on review.