Attachment download in FHIR not working from ABHA SBX HIP Portal

@IntegrationSupport @Ramandeep1 @saiki @Prajwal @Govind_Deshmukh
We are using ABHA SBX HIP Portal to test our PHR app.
We are not able to download the Attachment in the FHIR as it contains only attachment end point. e.g “url”: “/attachments/6cfb6e90-0a81-42ad-b7dc-93d3cf516ae1.jpeg”
Please tell us how we can do that
https://dev.ndhm.gov.in/cm/v1/patient/health-information/fetch

{“limit”:20,“offset”:0,“requestIds”:[“c51c504c-aad0-4cf9-b512-0ae3e19b0a5e”]}

{
“size”: 1,
“limit”: 20,
“offset”: 0,
“entries”: [
{
“hipId”: “IN3410000219”,
“consentRequestId”: “1ff0a001-22af-4e8f-b03e-980661b89d19”,
“consentArtefactId”: “5aec4191-8ea0-45a6-b8c7-43e205c3aaff”,
“status”: “SUCCEEDED”,
“data”: {
“resourceType”: “Bundle”,
“id”: “Diagnostic-bundle-21430”,
“meta”: {
“lastUpdated”: “2023-05-10T00:13:41.545+05:30”,
“tag”: [
{
“system”: “http://terminology.hl7.org/CodeSystem/v3-ObservationValue”,
“code”: “SUBSETTED”,
“display”: “Resource encoded in summary mode”
}
]
},
“identifier”: {
“system”: “https://emr.abdm.gov.in”,
“value”: “21430”
},
“type”: “document”,
“timestamp”: “2023-05-10T00:13:41.545+05:30”,
“entry”: [
{
“fullUrl”: “Composition/21430”,
“resource”: {
“resourceType”: “Composition”,
“id”: “21430”,
“meta”: {
“versionId”: “1”,
“lastUpdated”: “2023-05-10T00:13:41.545+05:30”,
“tag”: [
{
“system”: “http://terminology.hl7.org/CodeSystem/v3-ObservationValue”,
“code”: “SUBSETTED”,
“display”: “Resource encoded in summary mode”
}
]
},
“language”: “en-IN”,
“identifier”: {
“system”: “https://emr.abdm.gov.in”,
“value”: “21430”
},
“status”: “final”,
“type”: {
“coding”: [
{
“system”: “https://snomedct.abdm.gov.in/ionic”,
“code”: “721981007”,
“display”: “Diagnostic studies service”
}
],
“text”: “Diagnostic Report-Media”
},
“subject”: {
“reference”: “Patient/14114”
},
“date”: “2023-05-10T00:13:41+05:30”,
“author”: [
{
“reference”: “Practitioner/78-5576-8431-3437”
}
],
“title”: “Diagnostic Report-Media”,
“section”: [
{
“title”: “Diagnostic Report-Imaging Media”,
“code”: {
“coding”: [
{
“system”: “https://snomedct.abdm.gov.in/ionic”,
“code”: “721981007”,
“display”: “Diagnostic studies service”
}
]
},
“entry”: [
{
“reference”: “DiagnosticReport/12445”
}
]
}
]
}
},
{
“fullUrl”: “Patient/14114”,
“resource”: {
“resourceType”: “Patient”,
“id”: “14114”,
“meta”: {
“versionId”: “1”,
“lastUpdated”: “2023-05-10T00:04:58.000+05:30”,
“tag”: [
{
“system”: “http://terminology.hl7.org/CodeSystem/v3-ObservationValue”,
“code”: “SUBSETTED”,
“display”: “Resource encoded in summary mode”
}
]
},
“identifier”: [
{
“system”: “https://emr.abdm.gov.in”,
“value”: “14114”
}
],
“name”: [
{
“family”: “sawhney”,
“given”: [
“Rahul”
]
}
],
“telecom”: [
{
“system”: “phone”,
“value”: “7840099868”,
“use”: “home”
}
],
“gender”: “other”,
“birthDate”: “1992-10-16”
}
},
{
“fullUrl”: “Organization/IN3410000219”,
“resource”: {
“resourceType”: “Organization”,
“id”: “IN3410000219”,
“meta”: {
“tag”: [
{
“system”: “http://terminology.hl7.org/CodeSystem/v3-ObservationValue”,
“code”: “SUBSETTED”,
“display”: “Resource encoded in summary mode”
}
]
},
“identifier”: [
{
“system”: “https://facility.abdm.gov.in”,
“value”: “IN3410000219”
}
],
“name”: “Kidney Center Hospital”,
“telecom”: [
{
“system”: “phone”,
“use”: “work”
}
]
}
},
{
“fullUrl”: “Practitioner/78-5576-8431-3437”,
“resource”: {
“resourceType”: “Practitioner”,
“id”: “78-5576-8431-3437”,
“meta”: {
“versionId”: “1”,
“lastUpdated”: “2023-05-10T00:04:58.000+05:30”,
“tag”: [
{
“system”: “http://terminology.hl7.org/CodeSystem/v3-ObservationValue”,
“code”: “SUBSETTED”,
“display”: “Resource encoded in summary mode”
}
]
},
“identifier”: [
{
“system”: “https://digidoc.abdm.gov.in”,
“value”: “78-5576-8431-3437”
}
]
}
},
{
“fullUrl”: “DiagnosticReport/12445”,
“resource”: {
“resourceType”: “DiagnosticReport”,
“id”: “12445”,
“meta”: {
“tag”: [
{
“system”: “http://terminology.hl7.org/CodeSystem/v3-ObservationValue”,
“code”: “SUBSETTED”,
“display”: “Resource encoded in summary mode”
}
]
},
“identifier”: [
{
“system”: “https://emr.abdm.gov.in”,
“value”: “12445”
}
],
“status”: “final”,
“category”: [
{
“coding”: [
{
“system”: “https://snomedct.abdm.gov.in”,
“display”: “Test Report”
}
]
}
],
“code”: {
“text”: “Test Lab”
},
“subject”: {
“reference”: “Patient/14114”
},
“issued”: “2023-05-10T00:13:41.518+05:30”,
“performer”: [
{
“reference”: “Organization/IN3410000219”,
“display”: “Kidney Center Hospital”
}
],
“resultsInterpreter”: [
{
“reference”: “Practitioner/78-5576-8431-3437”
}
],
“conclusion”: “test conclusion”,
“presentedForm”: [
{
“contentType”: “image/jpeg”,
“language”: “en-IN”,
“url”: “/attachments/6cfb6e90-0a81-42ad-b7dc-93d3cf516ae1.jpeg”
}
]
}
}
]
},
“docId”: “Diagnostic-bundle-21430.UNKNOWN”,
“docOriginId”: “IN3410000219”
}
]
}

@Rahulsawhney Hello, Can you please share your registered email id / Client-id, so that we can reach out to you for a virtual connect.

@IntegrationSupport Our client id is SBX_000602. The only help we need is downloading the attachment coming from SBX HIP Portal. As only attachment URL end point is coming in it and not the full URL for downloading the attachment.

“presentedForm”: [
{
“contentType”: “image/jpeg”,
“language”: “en-IN”,
“url”: “/attachments/6cfb6e90-0a81-42ad-b7dc-93d3cf516ae1.jpeg”
}

@Rahulsawhney,

Can you be specific about the API call?
We can help.

@IntegrationSupport / @Shubhanshu_S

Thanks

@Shubhanshu_S @IntegrationSupport

We are fetching Health Record using the below API in out PHR app.

https://dev.ndhm.gov.in/cm/v1/patient/health-information/fetch

{“limit”:20,“offset”:0,“requestIds”:[“c51c504c-aad0-4cf9-b512-0ae3e19b0a5e”]}

{
“size”: 1,
“limit”: 20,
“offset”: 0,
“entries”: [
{
“hipId”: “IN3410000219”,
“consentRequestId”: “1ff0a001-22af-4e8f-b03e-980661b89d19”,
“consentArtefactId”: “5aec4191-8ea0-45a6-b8c7-43e205c3aaff”,
“status”: “SUCCEEDED”,
“data”: {
“resourceType”: “Bundle”,
“id”: “Diagnostic-bundle-21430”,
“meta”: {
“lastUpdated”: “2023-05-10T00:13:41.545+05:30”,
“tag”: [
{
“system”: “http://terminology.hl7.org/CodeSystem/v3-ObservationValue”,
“code”: “SUBSETTED”,
“display”: “Resource encoded in summary mode”
}
]
},
“identifier”: {
“system”: “https://emr.abdm.gov.in”,
“value”: “21430”
},
“type”: “document”,
“timestamp”: “2023-05-10T00:13:41.545+05:30”,
“entry”: [
{
“fullUrl”: “Composition/21430”,
“resource”: {
“resourceType”: “Composition”,
“id”: “21430”,
“meta”: {
“versionId”: “1”,
“lastUpdated”: “2023-05-10T00:13:41.545+05:30”,
“tag”: [
{
“system”: “http://terminology.hl7.org/CodeSystem/v3-ObservationValue”,
“code”: “SUBSETTED”,
“display”: “Resource encoded in summary mode”
}
]
},
“language”: “en-IN”,
“identifier”: {
“system”: “https://emr.abdm.gov.in”,
“value”: “21430”
},
“status”: “final”,
“type”: {
“coding”: [
{
“system”: “https://snomedct.abdm.gov.in/ionic”,
“code”: “721981007”,
“display”: “Diagnostic studies service”
}
],
“text”: “Diagnostic Report-Media”
},
“subject”: {
“reference”: “Patient/14114”
},
“date”: “2023-05-10T00:13:41+05:30”,
“author”: [
{
“reference”: “Practitioner/78-5576-8431-3437”
}
],
“title”: “Diagnostic Report-Media”,
“section”: [
{
“title”: “Diagnostic Report-Imaging Media”,
“code”: {
“coding”: [
{
“system”: “https://snomedct.abdm.gov.in/ionic”,
“code”: “721981007”,
“display”: “Diagnostic studies service”
}
]
},
“entry”: [
{
“reference”: “DiagnosticReport/12445”
}
]
}
]
}
},
{
“fullUrl”: “Patient/14114”,
“resource”: {
“resourceType”: “Patient”,
“id”: “14114”,
“meta”: {
“versionId”: “1”,
“lastUpdated”: “2023-05-10T00:04:58.000+05:30”,
“tag”: [
{
“system”: “http://terminology.hl7.org/CodeSystem/v3-ObservationValue”,
“code”: “SUBSETTED”,
“display”: “Resource encoded in summary mode”
}
]
},
“identifier”: [
{
“system”: “https://emr.abdm.gov.in”,
“value”: “14114”
}
],
“name”: [
{
“family”: “sawhney”,
“given”: [
“Rahul”
]
}
],
“telecom”: [
{
“system”: “phone”,
“value”: “7840099868”,
“use”: “home”
}
],
“gender”: “other”,
“birthDate”: “1992-10-16”
}
},
{
“fullUrl”: “Organization/IN3410000219”,
“resource”: {
“resourceType”: “Organization”,
“id”: “IN3410000219”,
“meta”: {
“tag”: [
{
“system”: “http://terminology.hl7.org/CodeSystem/v3-ObservationValue”,
“code”: “SUBSETTED”,
“display”: “Resource encoded in summary mode”
}
]
},
“identifier”: [
{
“system”: “https://facility.abdm.gov.in”,
“value”: “IN3410000219”
}
],
“name”: “Kidney Center Hospital”,
“telecom”: [
{
“system”: “phone”,
“use”: “work”
}
]
}
},
{
“fullUrl”: “Practitioner/78-5576-8431-3437”,
“resource”: {
“resourceType”: “Practitioner”,
“id”: “78-5576-8431-3437”,
“meta”: {
“versionId”: “1”,
“lastUpdated”: “2023-05-10T00:04:58.000+05:30”,
“tag”: [
{
“system”: “http://terminology.hl7.org/CodeSystem/v3-ObservationValue”,
“code”: “SUBSETTED”,
“display”: “Resource encoded in summary mode”
}
]
},
“identifier”: [
{
“system”: “https://digidoc.abdm.gov.in”,
“value”: “78-5576-8431-3437”
}
]
}
},
{
“fullUrl”: “DiagnosticReport/12445”,
“resource”: {
“resourceType”: “DiagnosticReport”,
“id”: “12445”,
“meta”: {
“tag”: [
{
“system”: “http://terminology.hl7.org/CodeSystem/v3-ObservationValue”,
“code”: “SUBSETTED”,
“display”: “Resource encoded in summary mode”
}
]
},
“identifier”: [
{
“system”: “https://emr.abdm.gov.in”,
“value”: “12445”
}
],
“status”: “final”,
“category”: [
{
“coding”: [
{
“system”: “https://snomedct.abdm.gov.in”,
“display”: “Test Report”
}
]
}
],
“code”: {
“text”: “Test Lab”
},
“subject”: {
“reference”: “Patient/14114”
},
“issued”: “2023-05-10T00:13:41.518+05:30”,
“performer”: [
{
“reference”: “Organization/IN3410000219”,
“display”: “Kidney Center Hospital”
}
],
“resultsInterpreter”: [
{
“reference”: “Practitioner/78-5576-8431-3437”
}
],
“conclusion”: “test conclusion”,
“presentedForm”: [
{
“contentType”: “image/jpeg”,
“language”: “en-IN”,
“url”: “/attachments/6cfb6e90-0a81-42ad-b7dc-93d3cf516ae1.jpeg”
}
]
}
}
]
},
“docId”: “Diagnostic-bundle-21430.UNKNOWN”,
“docOriginId”: “IN3410000219”
}
]
}

The record in the above response has been uploaded via ABHA SBX HIP Portal.
Also, We have an attachment URL in the above response specified in the “presentedForm”. We want to show the attachment in our PHR app. How we can download the attachment so that we can display it in the app as it is only the endpoint (“url”: “/attachments/6cfb6e90-0a81-42ad-b7dc-93d3cf516ae1.jpeg”) and not the full URL?

@Rahulsawhney were you able to donwload? can you please tell me the base URL you used to download the attachment.