CMSgov / price-transparency-guide-validator

Validation tool to check output files required by the price-transparency-guide
Apache License 2.0
30 stars 14 forks source link

Empty in_network/out_of_network array returns as valid #114

Closed jkHCBB closed 2 months ago

jkHCBB commented 9 months ago

Hello team!

I recently ran into an issue where I was working with some test data and found the following:

If a JSON file being sent through the validator, is formatted properly, and has the initial required fields properly set, the in_network array or out_of_network array can be left empty and the file will pass validation.

Since none of the other required fields are present in the JSON file I would assume this is not intended behavior.

Ex JSON:

INN: {"reporting_entity_name":"Healthcare Bluebook","reporting_entity_type":"Third Party","plan_name":"111111111","plan_id_type":"ein","plan_id":"111111111","plan_market_type":"group","last_updated_on":"2023-11-06","version":"1.0.0","in_network":[]} OON: {"reporting_entity_name":"Healthcare Bluebook","reporting_entity_type":"group health plan","plan_name":"111111111","plan_id_type":"HIOS","plan_id":"11111","plan_market_type":"individual","last_updated_on":"2024-02-01","version":"1.0.0","out_of_network":[ ]}

both of these files will return as 'Input JSON is valid.'

I have ran: cms-mrf-validator update so i should have the newest schemas

Thanks for your continued hard work!

jkHCBB commented 9 months ago

I have played with the schema and found adding "minItems": 1 to the array solves the issue. I hope this is helpful!

shaselton-usds commented 5 months ago

@jkHCBB Thanks for the feedback - cleaning up old threads here.

Having an empty allowed amount file (an empty array that is) is actually allowed, so requiring a minItems would flag false positives.

How much have you seen the in-network files being empty? That seems it would be much more rare (if at all).

jkHCBB commented 5 months ago

hmmmm, I don't see to many of the INN files coming in as empty but every now and then I will have one. After posting this I realized that allowed_amounts could be empty so I apologize for the oversite on that.