Not able to View data

Hi,

We have send the sample data in FHIR Json format for one of care context request.
Post the data push from HIP, i was looking the data at HIU (NDHM EMAR application).
It looks the data has received at HIU side, But it gives some error.

Attached the error screen:
and transaction ID for the data push is: 500203c6-0939-430e-9d42-1aebf232e6b8

Hi @karthik,
The HIU is unable to read encrypted content you are sending to data push url. Please make sure, the Entry content and keyMaterial you are sending to data push url is correct.

HI,

I have pushed one more data with proper key material and we got 202 accepted response
but nothing is display in HIU side.

the below is the request payload

{

"pageNumber": 1,

"pageCount": 1,

"transactionId": "cfe5504f-068a-4e47-8853-8a6dc83bccf6",

"entries": [

    {

        "content": "vnqj0TNVxVR2rri8Gtuh6AZMuzKMw3zgMkhtyWiL9q7bZVIeHL643CT4zXT45haTD3kKDriY1Zs7/MG9dgH3+gpUXkfE0zmRvpYxLhVTiYLyqQjQ11PFd0GOwcPYX29DbwyPW4ZZFwozqqWZUDlF85XNUflGISw3knFaCsDJXIYwkk6hvyYZqADPqbK2kMyNNdx14mUZxrtOrBOYvRtUbCD9pwP96E1gwOtR43+kLsyqMsj3Z58P8TmVXDW7VGUXQb5ETopKo+NdpzKSPTeHE7fyq9mkWCaWzUWgz0QZ/UcB7d27D4gjVQx/zvK19Jpe0G2BEY8xuZpHbxlpfYwpJ8Wvkb7vX5566FUM3tgpVqiJsyN/W1xxdzFo3rlRK+OK6cMzL28jUynMF1eIv5PLth30hr2AhOeGW0EzYyRMT1tacKoZgjUyf6aiMdiBTNQCL4BrfJCTiwyGl89sVUioQhTaRPzylJmaddtM23bOefoFJNYCFzAnFGiwzEYJb7Bi8bu6pqbnqFR6WCo+/OG/y7wFdnCugj4OnEglLgZAlluB7eLurP4Hpuu1QnzAABkf7B7IEen/NgrlkjlKlEZPHtMZdpHF8BvBmLIVUbg3sEsh1HP6VfiB5uLac1d+nUauIxvDV+bqZGxgbkcaRrlmSAwbUPdgirwtOLBbV6jTDQ0J1oUOsI/CENM4USteBagxd83NXuyWkBcr00oTFiq/M7hKCL+RItO6pGiV3c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QeHUBv+YLXG3nYQ/ImokHYNZGyP29MSQrDzZxeuKVeclIVj38kQWSQmtUV+ulqhjNGL0+0FBVCrdbNg6E3d4cabGguXQFt61F0B/Rl/v7MYzY6Qa6O0YKEjXMK9JHA=",

        "media": "application/fhir+json",

        "checksum": "string",

        "careContextReference": "DEMO-26-001"

    }

],

"keyMaterial": {

    "cryptoAlg": "ECDH",

    "curve": "Curve25519",

    "dhPublicKey": {

        "expiry": "2020-12-17T15:42:11.630669",

        "parameters": "Curve25519/32byte random key",

        "keyValue": "MIIBMTCB6gYHKoZIzj0CATCB3gIBATArBgcqhkjOPQEBAiB/////////////////////////////////////////7TBEBCAqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqYSRShRAQge0Je0Je0Je0Je0Je0Je0Je0Je0Je0Je0JgtenHcQyGQEQQQqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq0kWiCuGaG4oIa04B7dLHdI0UySPU1+bXxhsinpxaJ+ztPZAiAQAAAAAAAAAAAAAAAAAAAAFN753qL3nNZYEmMaXPXT7QIBCANCAARcdGnoyimZ1CjzSvKzm9p+UB09RpdUkisfuiw5NGkteVdcPG3nFetjQyobfF0Q3a5lI2J55W3+CK/aLp+KrLD4"

    },

    "nonce": "vYXuYFUDTZSJmzfaOpZWJEWHZMpvzv0xAWT151JTsaY="

}

}

Hi @karthik,
It seems like there is some issue with your content. can you please try with sample content:

If you are using java, please refer to: https://gist.github.com/Nexengineer/b53d2535ce247b82f1a3bd289728efdd

Hi @Gayatrij ,

I am using C#. can you give me sample code if you have in C#

Hey @karthik,
Please refer following sample code for C#:

HI @Gayatrij

Thanks for sharing C# code

I have replaced the below line of code from sample C#

     //Replace keyValue from v0.5/health-information/hip/request
    //var receiverPublicKey = GetPublicKey(receiverKeyPair); 
    var receiverPublicKey = "BDegLwiE5Cf 
+BurSVw5sOmi2rjl2dj3HMTQuYmoq+qUONR52jbS/tbMCxAhQApIy5ar7xfMgCw9/ZF6ElyQyLJM=";

    //Replace nonce from v0.5/health-information/hip/request
     //var randomKeyReceiver = GenerateRandomKey();
    var randomKeyReceiver = "aT+bg9PosCQDH7PX51AXVTJqPewZY7GDpx0YqUF3azI=";

Are we doing correct?

Hi @karthik,
this is correct

Hai @Gayatrij @karthik @IntegrationSupport Could you please help me for bundle preparation , For data transfer I am getting 202 Accepted but data is not displaying . I am using sample priscription bundle provided above



correlation-id : ae61dbcd-bb5a-422e-8823-71869445e898

My payload for datapush url : -

var myHeaders = new Headers();
myHeaders.append(“Authorization”, “Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJBbFJiNVdDbThUbTlFSl9JZk85ejA2ajlvQ3Y1MXBLS0ZrbkdiX1RCdkswIn0.eyJleHAiOjE2ODMyODc0ODIsImlhdCI6MTY4MzI4Njg4MiwianRpIjoiNzJkYTZjYzctMTA0MS00OWVhLWFkOTktYzJhYTQwMGE2OGZkIiwiaXNzIjoiaHR0cHM6Ly9kZXYubmRobS5nb3YuaW4vYXV0aC9yZWFsbXMvY2VudHJhbC1yZWdpc3RyeSIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiJjN2EzMGM1ZC0xYjExLTQ1MmQtOWEwYy1jN2NiM2VjYTEzMjgiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJTQlhfMDAwMzg3Iiwic2Vzc2lvbl9zdGF0ZSI6ImNkZjJmZGJiLWM3MjktNDE2Yi05MDQzLTRmMGNmNjY0NjlmMiIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiaHR0cDovL2xvY2FsaG9zdDo5MDA3Il0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJoaXUiLCJvZmZsaW5lX2FjY2VzcyIsImNtIiwiaGVhbHRoSWQiLCJwaHIiLCJPSURDIiwiZ2F0ZXdheSIsImhpcCJdfSwicmVzb3VyY2VfYWNjZXNzIjp7IlNCWF8wMDAzODciOnsicm9sZXMiOlsidW1hX3Byb3RlY3Rpb24iXX0sImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sInNjb3BlIjoib3BlbmlkIGVtYWlsIHByb2ZpbGUiLCJjbGllbnRIb3N0IjoiMTAuMjMzLjY3LjIwNyIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwiY2xpZW50SWQiOiJTQlhfMDAwMzg3IiwicHJlZmVycmVkX3VzZXJuYW1lIjoic2VydmljZS1hY2NvdW50LXNieF8wMDAzODciLCJjbGllbnRBZGRyZXNzIjoiMTAuMjMzLjY3LjIwNyJ9.WWaazDU6-SnJbSQMZUQ8QIcltx8wU6Y2xvOY4YFJAkUFz1L731qV2UIvHBHrJG6htCLf6IyA5cpyyU-KAb6a1K1_9Nh00cwlV8BJB6uNVQz2hwxweDyyPnz9reQrxgsk2duUOu_7jCSI-His5vs81Yd-EL7k_1gvj_5RSA92CsuWshkS4lYHigp-sc1zJZd0oatO7QOqtgUk5d3uOnhLM6m6enVyWh9EzUuQSkLTu7Vh2wKE52bXZFELOuuxPIjddRbrqTjzO7B02wHGup8X-sZI2WkL5avOkSqmrSp64WVPHPhVT_87pq9aP8q1-ATH3rT_wsiiD6x9nBlxXMsrFg”);
myHeaders.append(“X-CM-ID”, “sbx”);
myHeaders.append(“Content-Type”, “application/json”);
myHeaders.append(“Cookie”, “TS011c04bd=01445fed04c299d9999536c9c9f8966ecfd372748ee5c52c22eebf71ba50eb92ce49fbe7f959119086acb6205a6fe66f5419581ff4”);

var raw = JSON.stringify({
“pageNumber”: 1,
“pageCount”: 1,
“transactionId”: “57a15180-7343-4b7f-97cc-7210a4c1fbee”,
“entries”: [
{
“content”: “YlK1UbkgfYIVEQkA3oBPZUzqJMAFNcmL1Vlx/J2c2HNYlClbTQ8FJ+1LyFys89TO2ApZDaj2XLeiejFg6PrdnD3yULgVI/tDLAEWGCCNseMkbIM+LMoCRxY8svFyX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Rf52kRaszHtiJaZaC5DBojmjysUkLmSQjMvX+yTMqdEwOUsQS2yKKzCJz7ZMADoaLU1Qhe1RQJ/heIBcyeNbDwpNedplnRDEb0kN9TNMdcivDtY9Qz6wZcVA4TMpT16/11aL6B/NyYKsIS6IK/BxyaxlyeWZWTRRbwfQMHgrpSY9Kge0mMnzIXw7UCq9X1GMAtW7gvg4GHLZ5LzP/urZOGSIPCTIv2y6o9GJeFZVllupL/4ZNQwn0UoKaS4InGpmlTHnPl6KLPfIXuV30o12HFdWbzSx6g79sgkh+AZayEp+tvZEZLtW2VPKj9gPa3jdxnyUF2/jqFXJH0h5JISOZB7IoExoEUX+YpGzQEIwmyycI2MlPOzApOoC52tQaGuf0V/eFOOkC2T8OWsUNr1ksC6PtY7zUA7L/Z7gr6aTZrWjTXczESWMZHopdPDC5KPZsYJD6npWiVJI49hMG2sBhE6VWU/XdGUW3+P8rJHNPg96WJ+VK1L9WwDB1F8sgk04v91V5RcBFjM9+CdWQ/YF6l2BTayF6OCcMfBpgokHo/rWUTXKWskJFoQojuoFql+X1nRwPCpp9MzCWDidBpRSs+5FCyxIuOtQ9kdRNHb6vHILPO9aa65KnfjK1cqC/dYPeHBjw82DjiK5hvDrtzlDqq5HBgCvSt/ejf5LLwq0yF0hu/hrPuV/IQjxYvzcKmIK12UHJNCd6E6/XDSX3ZKRjsq1+OpZ9yi/Gxrh0G2plff7aKbeCvG4eZVJvv1kZMg4r”,
“media”: “application/fhir+json”,
“checksum”: “string”,
“careContextReference”: “464712”
}
],
“keyMaterial”: {
“cryptoAlg”: “ECDH”,
“curve”: “Curve25519”,
“dhPublicKey”: {
“expiry”: “2023-07-21T05:59:31.457Z”,
“parameters”: “Curve25519/32byte public key”,
“keyValue”: “MIIBMTCB6gYHKoZIzj0CATCB3gIBATArBgcqhkjOPQEBAiB/////////////////////////////////////////7TBEBCAqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqYSRShRAQge0Je0Je0Je0Je0Je0Je0Je0Je0Je0Je0JgtenHcQyGQEQQQqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq0kWiCuGaG4oIa04B7dLHdI0UySPU1+bXxhsinpxaJ+ztPZAiAQAAAAAAAAAAAAAAAAAAAAFN753qL3nNZYEmMaXPXT7QIBCANCAAQR73UfDb2DpxWiAlRi5LkqbUIA7koLk/ncOWRx3er2q3MvHPfuN3CP9/fanB0I1S1Vezu2dxOe5e5NORjVJ/lg”
},
“nonce”: “93B24Po+4VOIrmuw9Ki64ZdTFU/wh+Ii3yFU1kNvP1c=”
}
});

var requestOptions = {
method: ‘POST’,
headers: myHeaders,
body: raw,
redirect: ‘follow’
};

fetch(“https://dev.abdm.gov.in/api-hiu/data/notification”, requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log(‘error’, error));

Hi @ramakrishna337,

You are getting 202 accepted that means your fhir bundle is correct, but there might be issue with encryption, since you are not getting the data.

Important links:
NRCeS website: https://nrces.in/
FHIR implementation guide for ABDM: www.nrces.in/ndhm
Resources: https://nrces.in/resources
Libraries/ fhir implementations available:
http://hl7.org/fhir/R4/downloads.html