Aidbox / Issues

Issue tracker for Aidbox FHIR backend by Health Samurai
7 stars 0 forks source link

_profile should return conformant data to the profile #498

Open ashwini-patil20 opened 2 years ago

ashwini-patil20 commented 2 years ago

Problem I need to solve

When we query with _profile tag it should return only data conformant with profile tag and when we query without _profile it should return all data (conformant+non-conformant)

Solution I see

  1. We want all the data to be loaded in to the database whether it be conformant or non-conformant (possible with /fhir/$import)
  2. We will do batch validation with few IGs (possible with batch-validation) and need Aidbox to tag it with the IGs it is conformant with (not possible)
  3. So when we query with _profile tag it should return only data tagged by Aidbox with profile tag and when we query without _profile it should return all data (conformant+non-conformant)
ier commented 2 years ago

Hello, it doesn't seem to be Aidbox native feature. The _profile search parameter approach looks like performance killer.

  1. Postgres won't be able to use indexes and will do full table scan.
  2. Aidbox will have to re-validate each fetched row (billions of rows in large tables).
  3. It will be resource intensive for Aidbox to page data.

Current _profile search parameter behaves according to FHIR specification.

Please, consider building a middleware which adds needed behavior. It can be delivered as a part of Aidbox professional services. Please, reach out to us in case of your interest.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had activity in the last 30 days. Please make sure you've added all the necessary details including clear description and severity level.