Locker Setup Approve issue

Hi @Shubhanshu_Shukla,
I have tried to approve locker setup request and it’s got approved but in the response i got
SubscriptionID is NULL. Below is json payload

https://dev.abdm.gov.in/cm/locker-requests/approve
Request:
{“subscription”:{“requestId”:“eaa1650d-9cc3-4be0-a9b0-cdf56722e162”,“isApplicableForAllHIPs”:true,“includedSources”:[{“hiTypes”:[“DiagnosticReport”,“Prescription”,“ImmunizationRecord”,“DischargeSummary”,“OPConsultation”,“HealthDocumentRecord”,“WellnessRecord”],“purpose”:{“text”:“Self Requested”,“code”:“PATRQT”,“refUri”:null},“hip”:{“id”:“medixcel-akash-hospital-hip”,“name”:“Medixcel Akash Hospital HIP”,“isAllow”:true},“categories”:[“LINK”,“DATA”],“period”:{“from”:“1916-10-22T06:24:23.0929428”,“to”:“2121-10-22T06:24:22.9505272”}},{“hiTypes”:[“DiagnosticReport”,“Prescription”,“ImmunizationRecord”,“DischargeSummary”,“OPConsultation”,“HealthDocumentRecord”,“WellnessRecord”],“purpose”:{“text”:“Self Requested”,“code”:“PATRQT”,“refUri”:null},“hip”:{“id”:“CVLLPT_324156”,“name”:“CV LLP Hospital”,“isAllow”:true},“categories”:[“LINK”,“DATA”],“period”:{“from”:“1916-10-22T06:24:23.0929428”,“to”:“2121-10-22T06:24:22.9505272”}},{“hiTypes”:[“DiagnosticReport”,“Prescription”,“ImmunizationRecord”,“DischargeSummary”,“OPConsultation”,“HealthDocumentRecord”,“WellnessRecord”],“purpose”:{“text”:“Self Requested”,“code”:“PATRQT”,“refUri”:null},“hip”:{“id”:“driefcasehl”,“name”:“DRiefcase Health Locker”,“isAllow”:true},“categories”:[“LINK”,“DATA”],“period”:{“from”:“1916-10-22T06:24:23.0929428”,“to”:“2121-10-22T06:24:22.9505272”}}],“excludedSources”:[]},“autoApproval”:{“isApplicableForAllHIPs”:true,“hiu”:{“id”:“driefcasehl”,“name”:“DRiefcase Health Locker”},“includedSources”:[{“hiTypes”:[“DiagnosticReport”,“Prescription”,“ImmunizationRecord”,“DischargeSummary”,“OPConsultation”,“HealthDocumentRecord”,“WellnessRecord”],“purpose”:{“text”:“Self Requested”,“code”:“PATRQT”,“refUri”:null},“hip”:{“id”:“medixcel-akash-hospital-hip”,“name”:“Medixcel Akash Hospital HIP”,“isAllow”:true},“categories”:null,“period”:{“from”:“1916-10-22T06:24:23.0929428”,“to”:“2121-10-22T06:24:22.9505272”}},{“hiTypes”:[“DiagnosticReport”,“Prescription”,“ImmunizationRecord”,“DischargeSummary”,“OPConsultation”,“HealthDocumentRecord”,“WellnessRecord”],“purpose”:{“text”:“Self Requested”,“code”:“PATRQT”,“refUri”:null},“hip”:{“id”:“CVLLPT_324156”,“name”:“CV LLP Hospital”,“isAllow”:true},“categories”:null,“period”:{“from”:“1916-10-22T06:24:23.0929428”,“to”:“2121-10-22T06:24:22.9505272”}},{“hiTypes”:[“DiagnosticReport”,“Prescription”,“ImmunizationRecord”,“DischargeSummary”,“OPConsultation”,“HealthDocumentRecord”,“WellnessRecord”],“purpose”:{“text”:“Self Requested”,“code”:“PATRQT”,“refUri”:null},“hip”:{“id”:“driefcasehl”,“name”:“DRiefcase Health Locker”,“isAllow”:true},“categories”:null,“period”:{“from”:“1916-10-22T06:24:23.0929428”,“to”:“2121-10-22T06:24:22.9505272”}}],“excludedSources”:[]},“authorization”:{“requestId”:“c2524669-a72b-4259-b467-2cf1e9f3ca55”,“generatePerpetualToken”:true}}

Response:
{“subscriptionId”:null,“autoApprovalId”:“c9283651-1a68-40b0-b54c-7131da4e520f”,“authorizationId”:null}

Please guide us

1 Like

Hey @jatin,

From the logs we saw error happed for Path : path: /internal/patients/kaushal@sbx/subscription-requests

If you have selected ALL then there can be only single source.

Thank You

Hi @Shubhanshu_Shukla,
Thanks for reply.
So you means to pass excludedSources value should be NULL when all HIPs are selected?
Please provide demo json when all HIPs are selected

Hi @Shubhanshu_Shukla,
I have trying to locker request approve with below json. It’s got approved but in the response SubscriptionId got NULL.

Below is json payload

LockerSetupRequestID: c97d38ed-f55d-4154-b4c2-626262bd98a3
https://dev.abdm.gov.in/cm/locker-requests/approve
Request Body
{
“subscription”: {
“requestId”: “cfd1b47f-83d3-4982-b60e-5195887d2454”,
“isApplicableForAllHIPs”: true,
“includedSources”: [
{
“hiTypes”: [
“DiagnosticReport”,
“Prescription”,
“ImmunizationRecord”
],
“purpose”: {
“text”: “Self Requested”,
“code”: “PATRQT”,
“refUri”: null
},
“hip”: null,
“categories”: null,
“period”: {
“from”: “1916-12-27T11:45:29.8570977”,
“to”: “2121-12-27T11:45:29.7255374”
}
}
],
“excludedSources”: [
{
“hiTypes”: [
“DischargeSummary”,
“OPConsultation”,
“HealthDocumentRecord”,
“WellnessRecord”
],
“purpose”: {
“text”: “Self Requested”,
“code”: “PATRQT”,
“refUri”: null
},
“hip”: null,
“categories”: null,
“period”: {
“from”: “1916-12-27T11:45:29.8570977”,
“to”: “2121-12-27T11:45:29.7255374”
}
}
]
},
“autoApproval”: {
“isApplicableForAllHIPs”: true,
“hiu”: {
“id”: “driefcasehl”,
“name”: “DRiefcase Health Locker”
},
“includedSources”: [
{
“hiTypes”: [
“DiagnosticReport”,
“Prescription”,
“ImmunizationRecord”
],
“purpose”: {
“text”: “Self Requested”,
“code”: “PATRQT”,
“refUri”: null
},
“hip”: null,
“categories”: null,
“period”: {
“from”: “1916-12-27T11:45:29.8570977”,
“to”: “2121-12-27T11:45:29.7255374”
}
}
],
“excludedSources”: [
{
“hiTypes”: [
“DischargeSummary”,
“OPConsultation”,
“HealthDocumentRecord”,
“WellnessRecord”
],
“purpose”: {
“text”: “Self Requested”,
“code”: “PATRQT”,
“refUri”: null
},
“hip”: null,
“categories”: null,
“period”: {
“from”: “1916-12-27T11:45:29.8570977”,
“to”: “2121-12-27T11:45:29.7255374”
}
}
]
},
“authorization”: {
“requestId”: “5c7f9572-aafa-4e35-8fec-13fe586f566f”,
“generatePerpetualToken”: true
}
}

Response:
{“subscriptionId”:null,“autoApprovalId”:“6e454042-ea2e-4982-823b-acce93d9c690”,“authorizationId”:“5c7f9572-aafa-4e35-8fec-13fe586f566f”}

Hey @jatin,

Can you confirm if,
Request id you have passed above is received from this API,
{{GATEWAY_HOST}}/v0.5/subscription-requests/cm/init ?

also if `“isApplicableForAllHIPs”: true, includedSources is not required

Thanks

Hi,
Now it’s working.
Categories tag was missing.

    "categories": [
      "LINK","DATA"
    ],
1 Like

@jatin
hii jatin
can u please me in these subscription api