Nippin validation

Nippin validation

Laatst bijgewerkt: 2024-07-12 14:06

Scope

To support the Data Provider with the validation of the MyCarenet message, every night a csv file is generated with the latest information.

Requirements

The data provider needs access to the sftp folder of HD4DP2.0.

Server: IP of HD4DP v. 2 server

Username: (your SFTP credentials)

Password: (your SFTP credentials)

Path: /data/localsftp/upload (home directory of the user)

Output

Example output CSV file:

head -n2 output.csv
localdwh_id,localdwh_created_on,localdwh_registration_code,localdwh_register,nippin_message,nippin_status,nippin_created_on,nippin_payload_after_validation,result
13527,2024-01-08T05:57:12.965864+00:00,118.23.000241.41,QERMID_Pacemaker_ Remplacement,3f6da771-761d-406a-a05e-36886a0e8746,SENT,2024-03-06T13:22:36.450056+00:00,,valid

Status

StatusInfo
validA valid status means the payload looks okay and the nippin_status is ERROR, SENT or TO_SEND. An ERROR status needs to be checked by healthdata.be as there is a communication issue with MyCareNet and the message needs to be resent.
invalidAn invalid status means the payload is wrong and the nippin_status is INVALID or ARCHIVED. The issue needs to be investigated by healthdata.be. Please create a ticket in our support portal.
not_foundNo nippin message was created for the localdwh message. The issue needs to be investigated by healthdata.be. Please create a ticket in our support portal.

Explain the script

  1. Based on a query with the application rules, a complete list of localdwh messages is generated.
  2. The timestamp of the message is compared to the start date of the DCD https://www.riziv.fgov.be/nl/professionals/individuele-zorgverleners/verstrekkers-van-implantaten/terugbetaling-van-medische-verstrekkingen-of-medische-hulpmiddelen-via-qermid
  3. If available, the nippin_id of the localdwh_message is validated in the database.
  4. If no nippin_id is available, a query is triggered based on the registration code, returning the highest id of the nippin message.
  5. If nothing is found based on the nippin_id or the registration code, the record receives the status not_found.