Nippin validation
Dernière mise à jour: 2024-06-05 09:33
Scope
To support the Data Provider with the validation of the MyCarenet message we have built a validation script with the same rules that are used in the application.
Requirements
The data provider needs access to the server with the user name that has been provided to healthdata.be.
Information
The scripts can be found under the home directory (~/validate_nippin).
- .env: env file needed to run the script
- validate_nippin.py: script with the application rules
- validate_nippin.sh: bash script to run the python script
Usage
Go to the validate_nippin directory:
cd ~/validate_nippin
Run the script:
bash ./validate_nippin.sh
Output
After the script has been run, a summary will be printed on the terminal and a CSV file will be generated.
Example output terminal:
bash ./validate_nippin.sh
summary:
valid: 404, invalid: 38, not found: 0, total: 442
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
| Status | Info |
| valid | A 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. |
| invalid | An 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_found | No 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
- Based on a query with the application rules, a complete list of localdwh messages is generated.
- 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
- If available, the nippin_id of the localdwh_message is validated in the database.
- If no nippin_id is available, a query is triggered based on the registration code, returning the highest id of the nippin message.
- If nothing is found based on the nippin_id or the registration code, the record receives the status not_found.
docs.healthdata.be