Data push(PDF) to the HIU

Hi @IntegrationSupport we are trying to push pdf data to the dataPushURL.
The steps we are following is as follows.

  1. We are converting PDF data to base64 String.
  2. We are adding this base64 String to the FHIR json which is pasted below for your reference.
  3. We are then encrypting this json data using fidelius-cli
  4. Then we are adding this encrypted data to the hiu api inside “content’
    We are adding all the key materials as shown in the webinar and also referred to the document.
    But, we are getting this error in the HIU app " Error in the data received from Health information Providers”.
    We are getting 202 Accepted.
    Please help us to resolve this issue.
    FHIR JSON - {
    “resourceType”: “Bundle”,
    “id”: “9285fcde-fe04-4746-a85a-88badd1006ae”,
    “meta”: {
    “lastUpdated”: “2023-06-13T10:05:20+0000”
    },
    “identifier”: {
    “system”: “https://abdmtest.viewzenlabs.in”,
    “value”: “9285fcde-fe04-4746-a85a-88badd1006ae”
    },
    “type”: “document”,
    “timestamp”: “2023-06-13T10:05:20+0000”,
    “entry”: [
    {
    “fullUrl”: “Composition/3698f51b-a868-4a37-833c-b19f138fe2d4”,
    “resource”: {
    “resourceType”: “Composition”,
    “id”: “3698f51b-a868-4a37-833c-b19f138fe2d4”,
    “identifier”: {
    “system”: “https://abdmtest.viewzenlabs.in”,
    “value”: “3698f51b-a868-4a37-833c-b19f138fe2d4”
    },
    “status”: “final”,
    “type”: {
    “coding”: [
    {
    “system”: “https://projecteka.in/sct”,
    “code”: “419891008”,
    “display”: “Record artifact”
    }
    ]
    },
    “subject”: {
    “reference”: “Patient/LIVNO99”
    },
    “date”: “2023-06-13T10:05:20+0000”,
    “author”: [
    {
    “reference”: “Practitioner/MAX1456”
    }
    ],
    “title”: “Health Document Record”,
    “section”: [
    {
    “title”: “Health Document Record”,
    “code”: {
    “coding”: [
    {
    “system”: “https://projecteka.in/sct”,
    “code”: “419891008”,
    “display”: “Record artifact”
    }
    ]
    },
    “entry”: [
    {
    “reference”: “DocumentReference/a95874a8-cc27-4c70-820c-fe1fa9fe9e2a”
    }
    ]
    }
    ]
    }
    },
    {
    “fullUrl”: “Practitioner/MAX1456”,
    “resource”: {
    “resourceType”: “Practitioner”,
    “id”: “MAX1456”,
    “identifier”: [
    {
    “system”: “https://www.mciindia.in/doctor”,
    “value”: “MAX1456”
    }
    ],
    “name”: [
    {
    “text”: “Ramya”,
    “prefix”: [
    “Dr”
    ],
    “suffix”: [
    “MBBS”
    ]
    }
    ]
    }
    },
    {
    “fullUrl”: “Patient/LIVNO99”,
    “resource”: {
    “resourceType”: “Patient”,
    “id”: “LIVNO99”,
    “name”: [
    {
    “text”: “Venki”
    }
    ],
    “gender”: “male”
    }
    },
    {
    “fullUrl”: “DocumentReference/a95874a8-cc27-4c70-820c-fe1fa9fe9e2a”,
    “resource”: {
    “resourceType”: “DocumentReference”,
    “id”: “a95874a8-cc27-4c70-820c-fe1fa9fe9e2a”,
    “status”: “current”,
    “type”: {
    “coding”: [
    {
    “system”: “https://projecteka.in/loinc”,
    “code”: “30954-2”,
    “display”: “Surgical Pathology Report”
    }
    ]
    },
    “author”: [
    {
    “reference”: “Practitioner/MAX1456”
    }
    ],
    “content”: [
    {
    “attachment”: {
    “contentType”: “application/pdf”,
    “data”: “<PDF base 64 String>”,
    “title”: “Health Document Record”
    }
    }
    ]
    }
    }
    ]
    }

https://dev.abdm.gov.in/api-hiu/data/notification (Request body):-
{
“pageNumber”: 1,
“pageCount”: 1,
“transactionId”: “780a18dd-4608-4e5d-9aac-6d1b60111564”,
“entries”: [
{
“content”: “”,
“media”: “application/pdf”,
“checksum”: “72a9491fdb7b7e341d3a0b4c45f9684c”,
“careContextReference”: “00781”
}
],
“keyMaterial”: {
“cryptoAlg”: “ECDH”,
“curve”: “Curve25519”,
“dhPublicKey”: {
“expiry”: “2023-06-16T08:06:06.115467”,
“parameters”: “Ephemeral public key”,
“keyValue”: “MIIBMTCB6gYHKoZIzj0CATCB3gIBATArBgcqhkjOPQEBAiB/////////////////////////////////////////7TBEBCAqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqYSRShRAQge0Je0Je0Je0Je0Je0Je0Je0Je0Je0Je0JgtenHcQyGQEQQQqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq0kWiCuGaG4oIa04B7dLHdI0UySPU1+bXxhsinpxaJ+ztPZAiAQAAAAAAAAAAAAAAAAAAAAFN753qL3nNZYEmMaXPXT7QIBCANCAARMiCi4Jv2Jd61yrVIYCjHugIbvBZL3SRm5awOMF2H7ozyMyxM8+gK94b3o6hvy7C5QNNUKasZbDn5Fw15ZxSmR”
}
},
“nonce”: “aO3k2Jgk1VYRWO8tzPpob5wD5Rt2FBXPyyJAyUYDw+4=”
}

https://dev.abdm.gov.in/gateway/v0.5/health-information/notify (Request body)
{

"requestId": "{{$guid}}",

"timestamp": "{{timestamp}}",

"notification": {

    "consentId": "d265c216-89fc-4651-8ed9-2a45c455e72d",

    "transactionId": "780a18dd-4608-4e5d-9aac-6d1b60111564",

    "doneAt": "{{timestamp}}",

    "notifier": {

        "type": "HIU",

        "id": "Test_Doc_001"

    },

    "statusNotification": {

        "sessionStatus": "TRANSFERRED",

        "hipId": "IN2910000178_2",

        "statusResponses": [

            {

                "careContextReference": "00781",

                "hiStatus": "OK",

                "description": "Acidity"

            }

        ]

    }

}

}

@viewzen Please share entity name and SBX client ID.

@IntegrationSupport please find the required details
SBX Client Id - SBX_002117
entity name - Viewzen Labs

@viewzen hi, we have escalated the issue with the tech team, will revert with resolution soon.

@IntegrationSupport can you please update us regarding the above mentioned issue?

@viewzen The FHIR - Bundle is not valid. Please pass valid FHIR-Bundle.

@IntegrationSupport The FHIR had error only in timestamp, i changed the timestamp according to the required format. I validated it, there are no errors. But still I am facing the same issue.
This is the updated one:-
{
“resourceType”: “Bundle”,
“id”: “9285fcde-fe04-4746-a85a-88badd1006ae”,
“meta”: {
“lastUpdated”: “2023-06-25T15:32:26.605+05:30”
},
“identifier”: {
“system”: “https://abdmtest.viewzenlabs.in”,
“value”: “9285fcde-fe04-4746-a85a-88badd1006ae”
},
“type”: “document”,
“timestamp”: “2023-06-25T15:32:26.605+05:30”,
“entry”: [
{
“fullUrl”: “Composition/3698f51b-a868-4a37-833c-b19f138fe2d4”,
“resource”: {
“resourceType”: “Composition”,
“id”: “3698f51b-a868-4a37-833c-b19f138fe2d4”,
“identifier”: {
“system”: “https://abdmtest.viewzenlabs.in”,
“value”: “3698f51b-a868-4a37-833c-b19f138fe2d4”
},
“status”: “final”,
“type”: {
“coding”: [
{
“system”: “https://abdmtest.viewzenlabs.in”,
“code”: “419891008”,
“display”: “Record artifact”
}
]
},
“subject”: {
“reference”: “Patient/LIVNO99”
},
“date”: “2023-06-25T15:32:26.605+05:30”,
“author”: [
{
“reference”: “Practitioner/MAX1456”
}
],
“title”: “Health Document Record”,
“section”: [
{
“title”: “Health Document Record”,
“code”: {
“coding”: [
{
“system”: “https://abdmtest.viewzenlabs.in”,
“code”: “419891008”,
“display”: “Record artifact”
}
]
},
“entry”: [
{
“reference”: “DocumentReference/a95874a8-cc27-4c70-820c-fe1fa9fe9e2a”
}
]
}
]
}
},
{
“fullUrl”: “Practitioner/MAX1456”,
“resource”: {
“resourceType”: “Practitioner”,
“id”: “MAX1456”,
“identifier”: [
{
“system”: “https://www.mciindia.in/doctor”,
“value”: “MAX1456”
}
],
“name”: [
{
“text”: “Ramya”,
“prefix”: [
“Dr”
],
“suffix”: [
“MBBS”
]
}
]
}
},
{
“fullUrl”: “Patient/LIVNO99”,
“resource”: {
“resourceType”: “Patient”,
“id”: “LIVNO99”,
“name”: [
{
“text”: “Venki”
}
],
“gender”: “male”
}
},
{
“fullUrl”: “DocumentReference/a95874a8-cc27-4c70-820c-fe1fa9fe9e2a”,
“resource”: {
“resourceType”: “DocumentReference”,
“id”: “a95874a8-cc27-4c70-820c-fe1fa9fe9e2a”,
“status”: “current”,
“type”: {
“coding”: [
{
“system”: “https://projecteka.in/loinc”,
“code”: “30954-2”,
“display”: “Surgical Pathology Report”
}
]
},
“author”: [
{
“reference”: “Practitioner/MAX1456”
}
],
“content”: [
{
“attachment”: {
“contentType”: “application/pdf”,
“data”: <PDF base 64 String>,
“title”: “Health Document Record”
}
}
]
}
}
]
}

@IntegrationSupport can you please update on this asap. We are stuck here from almost 2 weeks. Tried different JSON’s but same error. Not able to proceed further. It would be of great help if you can help us to proceed further. Thanks in advance.

@viewzen The FHIR bundle is not valid , Please check it again https://fhir.healthit.gov/validator/

@IntegrationSupport Can you please send any valid FHIR bundle if you have, where we can replace only our PDF data(base 64 string) and will try again.

@viewzen: Request you to visit : https://www.nrces.in/ndhm/fhir/r4/index.html
You will all details of FHIR bundle in the link shared.

@IntegrationSupport We tried with this bundle https://www.nrces.in/ndhm/fhir/r4/DiagnosticReport-ImagingDCM-example-02.html. We didn’t change anything in this, just we encrypted the data using key materials and nonce and pushed data to this url https://dev.abdm.gov.in/api-hiu/data/notification. And after this we called this API https://dev.abdm.gov.in/gateway/v0.5/health-information/notify by giving transaction id and consent id. But still we get the same error. When we send these API calls, we get 202 accepted. But in HIU app we get “Error in the data received from 1 Health information Providers”.
Let us know if anything we are missing while pushing the data. Also let us know if you can schedule the call to check if we are doing it properly.

@IntegrationSupport and @viewzen any Update on this issue facing the same issue.

@viewzen Request you to go through this link: https://sandbox.abdm.gov.in/docs/data_encrypt_decrypt
https://sandbox.abdm.gov.in/docs/diagnostic_report

Hi @IntegrationSupport,

We are passing a valid json with base64 encoded data I am still getting this error can you please clarify me on what exactly is the error?

@IntegrationSupport can you please update us on this issue?

Hi @IntegrationSupport,

Can you please update me regarding the above issue?

@viewzen: Please use online validator available here: https://fhir.healthit.gov/validator/

@IntegrationSupport the ABHAA SBX app is not working properly can you please look into it?

@viewzen Abha sbx is down, please try again later