Hi @adnan_360
Multiple care contexts for the same person are being returned with same reference number. Here is the curl:
curl --location --request GET ‘https://dev.abdm.gov.in/cm/patients/links’
–header ‘Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJBbFJiNVdDbThUbTlFSl9JZk85ejA2ajlvQ3Y1MXBLS0ZrbkdiX1RCdkswIn0.eyJleHAiOjE2NDgwMzc2MjksImlhdCI6MTY0ODAzNzAyOSwianRpIjoiZjVmZmU4ZGQtNTZiNi00ZTg3LWJjYTYtMzYwMDgzNWI5NDk1IiwiaXNzIjoiaHR0cHM6Ly9kZXYubmRobS5nb3YuaW4vYXV0aC9yZWFsbXMvY2VudHJhbC1yZWdpc3RyeSIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiJhNzIxM2I3MS0zZWExLTQ1OGEtOGYyNC0yZDFiMWFlZDg5ZDQiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJTQlhfMDAwNDAyIiwic2Vzc2lvbl9zdGF0ZSI6IjhlYTAwOWJmLTc2Y2EtNDhjMi04MWQ5LWQ5ZGYzNDcwZjM1MCIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiaHR0cDovL2xvY2FsaG9zdDo5MDA3Il0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJoaXUiLCJvZmZsaW5lX2FjY2VzcyIsImhlYWx0aElkIiwiT0lEQyIsImhpcCJdfSwicmVzb3VyY2VfYWNjZXNzIjp7IlNCWF8wMDA0MDIiOnsicm9sZXMiOlsidW1hX3Byb3RlY3Rpb24iXX0sImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sInNjb3BlIjoib3BlbmlkIGVtYWlsIHByb2ZpbGUiLCJjbGllbnRIb3N0IjoiMTAuMjMzLjY5LjQ3IiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLC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qZetPStuD9RqB8-R0C47_EMi2DXaUJjR_RSuwKHNVFFaO0YJuXaFz_XT3O5h1sK6aNFOI4WYOuLVadFyhF5uY_Empg5Gx6NwisF0mlS3BjxKCdZF2cqh48iJc2u8uYmeCCCxob-HOOLqX8Wlhx5vZlp1uGLwFXMFQBVzvZhko_s-7z_ZnEUh_EVN0Xf_tScUQtzztVrdK-SRV4pW2-hbSF239d7qE6Xgjxi173a4ZtkVbCOOoNteg3cKLlm60kM8fZacR3uQExEEu9jaWc6WXLMFrhQ_ACQCLblr9KCGV9Dmg7mguEy2BvgOLVb1EvByQwYi1ou44JvEemD5nqfo_haproJtwyia_R66sBRZCDql-BRH4mRnjxVPFMxRODk4Sd68qBEzUQZuyCz09I9yxXvfSbBkY6102BxCUMDTEQ’
–header ‘Cookie: TS011c04bd=01115a1c905c2d9332bf4f86150a8927c4e59f66c9fbc2fc526670d7f7c72e339a939592c5a196cfa0246f2ead970c45a54f84906f; TS011c04bd=01115a1c905ab6e48e5ae286fefbb4f18f936749b07745cc490ad4733b12879091e7596c6a2fbc91ea779129992054d1fb45a7ad79’
Here is the api response:
{
“patient”: {
“id”: “arpan90@sbx”,
“links”: [
{
“hip”: {
“id”: “IN3410000219”,
“name”: “Kidney Center Hospital”,
“type”: “HIP”
},
“referenceNumber”: “17878”,
“display”: “Patient Visit Details”,
“careContexts”: [
{
“referenceNumber”: “17878”,
“display”: “No Data Available”
},
{
“referenceNumber”: “17878”,
“display”: “No Data Available”
},
{
“referenceNumber”: “17878”,
“display”: “No Data Available”
},
{
“referenceNumber”: “17885”,
“display”: “No Data Available”
},
{
“referenceNumber”: “17878”,
“display”: “No Data Available”
},
{
“referenceNumber”: “17885”,
“display”: “No Data Available”
},
{
“referenceNumber”: “17878”,
“display”: “No Data Available”
},
{
“referenceNumber”: “17878”,
“display”: “No Data Available”
},
{
“referenceNumber”: “17878”,
“display”: “No Data Available”
},
{
“referenceNumber”: “17878”,
“display”: “No Data Available”
}
]
}
]
}
}
As you can see multiple care contexts have been generated for both referenceNumber “17878” and “17885”.
Please do the needful to correct this.