Consent request date range doesn't match with the request received by HIP

Hi @mdubey

We sent a consent request to patient as follow:

{
   "requestId":"428766d7-3548-482b-b9da-6a4479cce07e",
   "timestamp":"2021-05-10T10:52:41.000000",
   "consent":{
      "purpose":{
         "text":"Immunization History",
         "code":"CAREMGT"
      },
      "patient":{
         "id":"kunal172@sbx"
      },
      "hiu":{
         "id":"medixcel-akash-hospital-hiu"
      },
      "requester":{
         "name":"NH Doctor"
      },
      "hiTypes":[
         "OPConsultation",
         "DischargeSummary"
      ],
      "permission":{
         "accessMode":"VIEW",
         "dateRange":{
            "from":"2021-05-06T18:30:00.000Z",
            "to":"2021-05-10T18:29:59.000Z"
         },
         "dataEraseAt":"2021-05-15T17:48:59.000Z",
         "frequency":{
            "unit":"HOUR",
            "value":"1",
            "repeats":6
         }
      }
   }
} 

HIP received the request to send the data for the same to HIU who sent the request to the patient. The request received by HIP was as below:

{
   "notification":{
      "consentDetail":{
         "consentId":"0da052ca-7eec-4246-9a51-c1d8953dd7ab",
         "createdAt":"2021-05-10T11:00:39.731087",
         "purpose":{
            "text":"Immunization History",
            "code":"CAREMGT",
            "refUri":null
         },
         "patient":{
            "id":"kunal172@sbx"
         },
         "consentManager":{
            "id":"sbx"
         },
         "hip":{
            "id":"medixcel-ganga-hospital-hip",
            "name":"Medixcel Ganga Hospital HIP"
         },
         "hiTypes":[
            "DischargeSummary",
            "OPConsultation"
         ],
         "permission":{
            "accessMode":"VIEW",
            "dateRange":{
               "from":"2021-05-06T18:30:00",
               "to":"2021-05-10T18:29:59"
            },
            "dataEraseAt":"2021-05-15T17:48:59",
            "frequency":{
               "unit":"HOUR",
               "value":1,
               "repeats":6
            }
         },
         "careContexts":[
            {
               "patientReference":"PU-A14-AAC2954",
               "careContextReference":"bcb729e5-3b1f-4345-851b-d544b6e6caee"
            }
         ]
      },
      "status":"GRANTED",
      "signature":"Lhv3RO6iYSWlvcE6TzDVbF3E0wJbf5XAphB32BeQwwIHWXysjkeekmJXqgmL0vQUR4N+HuCwHftVFNJtUgS1b7aOVwcmq5XGWsuNCFgtmfX7mOLDdtjCq3W+6goxOQORVLXxno32t\/JJ6gq\/Pwg3Vs2Lg7VhPqc8A37U7mfDSNjJCzMgrRrGTOAVxvr0Sgi3zpWMJ9ggIk3tK5iZSo+404SMdNcYhzYBbzTJZFXWxe\/uQtHTnQjNLSgsvNxkjh5NkEGM\/gFgEzT\/2WVBGGBueQQxqDb\/9Mair2AG0pigLvFPpXMlG\/hkP3lsvjXVXL9ihWPJGcPbd1c5AtS137XVkQ==",
      "consentId":"0da052ca-7eec-4246-9a51-c1d8953dd7ab"
   },
   "requestId":"fb68a1ac-dc57-472a-9c3e-705a5e50d6f6",
   "timestamp":"2021-05-10T11:00:39.841152"
} 

Here if you see, The consent date range was 2021-05-06T18:30:00.000Z to 2021-05-10T18:29:59.000Z but the request received by HIP is 2021-05-06T18:30:00 and 2021-05-10T18:29:59 and both actually mean different time.

Can you please check this?

Hi @bhaskar.dabhi,

both actually mean different time.

Could you please let us know what difference you mean here. Any requests from Gateway supposed to have the UTC time with it always.

Also could you please tell us, how are you getting the response above, is it a String representation of one of your Models on HIP side or it is coming from webhook etc?

Thank you

Hi @mdubey

Consent start date that we sent was 2021-05-06T18:30:00.000Z which converts to Fri May 07 2021 00:00:00 IST but the HIP received is 2021-05-06T18:30:00 which converts to Thu May 06 2021 18:30:00 IST

Same goes for consent end date.

{
   "notification":{
      "consentDetail":{
         "consentId":"0da052ca-7eec-4246-9a51-c1d8953dd7ab",
         "createdAt":"2021-05-10T11:00:39.731087",
         "purpose":{
            "text":"Immunization History",
            "code":"CAREMGT",
            "refUri":null
         },
         "patient":{
            "id":"kunal172@sbx"
         },
         "consentManager":{
            "id":"sbx"
         },
         "hip":{
            "id":"medixcel-ganga-hospital-hip",
            "name":"Medixcel Ganga Hospital HIP"
         },
         "hiTypes":[
            "DischargeSummary",
            "OPConsultation"
         ],
         "permission":{
            "accessMode":"VIEW",
            "dateRange":{
               "from":"2021-05-06T18:30:00",
               "to":"2021-05-10T18:29:59"
            },
            "dataEraseAt":"2021-05-15T17:48:59",
            "frequency":{
               "unit":"HOUR",
               "value":1,
               "repeats":6
            }
         },
         "careContexts":[
            {
               "patientReference":"PU-A14-AAC2954",
               "careContextReference":"bcb729e5-3b1f-4345-851b-d544b6e6caee"
            }
         ]
      },
      "status":"GRANTED",
      "signature":"Lhv3RO6iYSWlvcE6TzDVbF3E0wJbf5XAphB32BeQwwIHWXysjkeekmJXqgmL0vQUR4N+HuCwHftVFNJtUgS1b7aOVwcmq5XGWsuNCFgtmfX7mOLDdtjCq3W+6goxOQORVLXxno32t\/JJ6gq\/Pwg3Vs2Lg7VhPqc8A37U7mfDSNjJCzMgrRrGTOAVxvr0Sgi3zpWMJ9ggIk3tK5iZSo+404SMdNcYhzYBbzTJZFXWxe\/uQtHTnQjNLSgsvNxkjh5NkEGM\/gFgEzT\/2WVBGGBueQQxqDb\/9Mair2AG0pigLvFPpXMlG\/hkP3lsvjXVXL9ihWPJGcPbd1c5AtS137XVkQ==",
      "consentId":"0da052ca-7eec-4246-9a51-c1d8953dd7ab"
   },
   "requestId":"fb68a1ac-dc57-472a-9c3e-705a5e50d6f6",
   "timestamp":"2021-05-10T11:00:39.841152"
} 

This is the request that HIP get for sharing the data for the consent request that we raised. It is the request body of /v0.5/consents/hip/notify

@mdubey can you look into this? Let me know if you need more information

@sukreet Can you look into this?

Hi @bhaskar.dabhi,

All the dates which are being sent out are UTC only. We will check and if there are differences in the timezone we will raise a fix for it.

Thank you

1 Like

Thanks @mdubey, You can use https://devforum.ndhm.gov.in/t/consent-request-date-range-doesnt-match-with-the-request-received-by-hip/1362/3?u=bhaskar.dabhi as reference. This is the request that we got from Gateway .

1 Like