HIU Consent request using HIU ID = HIP ID is not working

We (as a HIP) are using the API below to request the consent of the patient
https://dev.ndhm.gov.in/gateway/v0.5/consent-requests/init

We are facing certain issues with this request. All the scenarios are listed below.
I would need a solution for scenario (A) listed below.

In real life, when a HIP is requesting consent, what should be specified in the HIU ID field?


(A) If the HIP ID is specified in the HIU ID field of the request, it is returning INVALID HIU. (HIP ID used is a valid HIP ID)

Request Body:
{
“requestId”: “{{$guid}}”,
“timestamp”: “{{timestamp}}”,
“consent”: {
“purpose”: {
“text”: “string”,
“code”: “CAREMGT”
},
“patient”: {
“id”: “santojit@sbx”
},
“hiu”: {
“id”: “MEDePAL_002_HIP”
},
“requester”: {
“name”: “Dr. Manju”,
“identifier”: {
“type”: “REGNO”,
“value”: “MH1001”,
“system”: “https://www.mciindia.org
}
},
“hiTypes”: [
“OPConsultation”
],
“permission”: {
“accessMode”: “VIEW”,
“dateRange”: {
“from”: “2022-02-16T12:52:34.925Z”,
“to”: “2022-02-17T12:52:34.925Z”
},
“dataEraseAt”: “2022-02-25T12:52:34.925Z”,
“frequency”: {
“unit”: “DAY”,
“value”: 1,
“repeats”: 0
}
}
}
}

Webhook Response:
{
“requestId”: “1f12074d-3bb7-4fbd-8ddd-787cd9738b15”,
“error”: {
“code”: 2500,
“message”: “Invalid HIU id: MEDePAL_002_HIP”
},
“timestamp”: [
2022,
2,
17,
9,
30,
7,
55632000
],
“resp”: {
“requestId”: “b02ca522-ac8e-4f26-ac53-4aec020f3fb9”
}
}


(B) If an existing HIU ID (created a few months back) is used in the HIU ID field of the request, it is returning INVALID HIU. (HIU ID used is a valid HIU ID)

Request Body:
{
“requestId”: “{{$guid}}”,
“timestamp”: “{{timestamp}}”,
“consent”: {
“purpose”: {
“text”: “string”,
“code”: “CAREMGT”
},
“patient”: {
“id”: “santojit@sbx”
},
“hiu”: {
“id”: “SBX_000077_HIU”
},
“requester”: {
“name”: “Dr. Manju”,
“identifier”: {
“type”: “REGNO”,
“value”: “MH1001”,
“system”: “https://www.mciindia.org
}
},
“hiTypes”: [
“OPConsultation”
],
“permission”: {
“accessMode”: “VIEW”,
“dateRange”: {
“from”: “2022-02-16T12:52:34.925Z”,
“to”: “2022-02-17T12:52:34.925Z”
},
“dataEraseAt”: “2022-02-25T12:52:34.925Z”,
“frequency”: {
“unit”: “DAY”,
“value”: 1,
“repeats”: 0
}
}
}
}

Webhook Response
{
“requestId”: “52dd6d8e-8dbd-4057-935b-820458144bfa”,
“error”: {
“code”: 2500,
“message”: “Invalid HIU id: SBX_000077_HIU
},
“timestamp”: [
2022,
2,
17,
10,
55,
29,
374812000
],
“resp”: {
“requestId”: “cad168e4-a604-4459-84c6-2eaf2f41ca39”
}
}


(C ) If a newly created HIU ID is used in the HIU ID field of the request, it is returning the expected proper response

Hello

I would suggest to go through this thread:

Here they have explained why this scenario

@sebisamuel20 Thank you.
Going ahead, I think HIP ID should be allowed to be used as HIU ID also. Else there will be an overhead of double registration for the same entity in two roles. Will be good to have the feedback of the other users.