FDA / openfda

openFDA is an FDA project to provide open APIs, raw data downloads, documentation and examples, and a developer community for an important collection of FDA public datasets.
https://open.fda.gov
Creative Commons Zero v1.0 Universal
569 stars 131 forks source link

Wrong schema in schema link #137

Closed maksle closed 4 years ago

maksle commented 4 years ago

https://download.open.fda.gov/2020-07-11/device/enforcement/recall_schema.json This link is from https://download.open.fda.gov/

It appears to have the drug enforcement schema properties in openfda when you visit the page. Is it correct?

maksle commented 4 years ago

It is also missing postal_code

maksle commented 4 years ago

openfda field is always empty in the data for device enforcement (though it is in the schema), which I don't know whether it is due to this schema problem

dkrylovsb commented 4 years ago

The thing is, the three Enforcement endpoints -- Drug/Device/Food Recall Enforcement Reports -- are served from a single Elasticsearch index internally. product_type is used as a differentiator for the nouns as can be seen for example here. A side effect of that is that the harmonization section (openfda) is only provided for one of the nouns, i.e. Drugs. It remains empty for Devices and Food by design.

We'll add postal code shortly. Thanks for catching this.

dkrylovsb commented 4 years ago

postal_code added.