You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using $import operation to import data into Azure FHIR service. I am using ndjson format. Part of my code is below:
defimport_data2FHIR(access_token, file_info):
# Azure FHIR service URLfhir_service_url="https://<my_fhir_service>.fhir.azurehealthcareapis.com"# Set up the headers with the tokenheaders= {
"Authorization": f"Bearer {access_token}",
'Prefer': 'respond-async',
'Content-Type': 'application/fhir+json'
}
# Example FHIR resource (Patient)fhir_resource= {
"resourceType": "Parameters",
"parameter": [
{
"name": "inputFormat",
"valueString": "application/fhir+ndjson"
},
{
"name": "mode",
"valueString": "InitialLoad",
},
{
"name": "input",
"part": [
{
"name": "url",
"valueUri": file_info["url"]
},
{
"name": "etag",
"valueUri": file_info["etag"]
}
]
}
]
}
# POST the FHIR resource to the FHIR serverresponse=requests.post(f"{fhir_service_url}/$import", json=fhir_resource, headers=headers)
# Check the responseifresponse.status_code==201:
print("Resource created successfully")
print("Response:", response.json())
else:
print("Failed to create resource")
print("Status Code:", response.status_code)
print("Response:", response.json())
if__name__=="__main__":
access_token=get_token() # I get my access token successfullyfile_info= {"url": "https://<my_storage_account>.blob.core.windows.net/tmp-file-system/my-directory/patient-fhir-data-2019Jul10-0903.ndjson",
"etag": "0x8DC9402319782B2"}
import_data2FHIR(access_token, file_info8)
<my_fhir_service> has been already assigned to Contributor and Storage Blob Data Contributor role to <my_storage_account>.
But I got status code 202 with error:
@BGDSW
It would be great if you could add a link to the documentation you are following for these steps? This would help us redirect the issue to the appropriate team. Thanks!!
I am using $import operation to import data into Azure FHIR service. I am using ndjson format. Part of my code is below:
<my_fhir_service> has been already assigned to Contributor and Storage Blob Data Contributor role to <my_storage_account>.
But I got status code 202 with error:
Would you please help how to troubleshoot this issue? I really appreciate your help.
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: