opencrvs / opencrvs-core

A global solution to civil registration
https://www.opencrvs.org
Other
85 stars 67 forks source link

Event Notification API & FHIR Builders: validate all supplied select options against a cached form.json. #5465

Open euanmillar opened 1 year ago

euanmillar commented 1 year ago

Gateway loads countryconfig form.json and stores in a global variable. We need a mapping between FHIR and the form.json. Can't we use type-resolvers for this?

EventNotification API generated FHIR should compare the field value with supported select options in the form json and ensure that they are supported by our form.

Before posting the FHIR payload to Hearth from fhir-builders, perform the same check, thus validating the GraphQL API too.

Zangetsu101 commented 1 year ago

How would we know which resource in the bundle matches which field in our form?