Registration integration

Interoperating with a National ID system at the point of registration, both synchronously and asynchronously.

In the OpenCRVS UI, when a registrar clicks the "Register" button on a fully complete and validated declaration, the legal authority has been given to create a birth registration. It is then possible to integrate with a National ID system, both synchronously and asynchronously.

Synchronous integration - birth & death

Once internal audit has taken place of that action in the "workflow" microservice, the following endpoint in the configurable countryconfig microservice is called while the registration is in a WAITING_VALIDATION status:

/event-registration

The entire registration data payload is sent to this endpointarrow-up-right as a FHIR Bundle.

circle-exclamation

In our example we create a birth / death registration number at this point and return the amended payload to OpenCRVS. Any synchronous interaction with a National ID system can take place here.

If a 200 is returned from this handler, the record will proceed to register, gaining a REGISTERED status, and appear in the Ready To Print work queue.

If any error occurs such as a 500, the record will be placed in a REJECTED status with the reason being equal to whatever error code or message is available.

The following library can return a graceful rejection message.

@hapi/boom badImplementation

Aynchronous integration - birth & death

It is possible to use the same endpoint asynchronously. But first, the following setting must be set to true in application-config.ts:

EXTERNAL_VALIDATION_WORKQUEUE: true

This configuration setting enables a work-queue "In external validation" that can hold records in a WAITING_VALIDATION status until an asynchronous process completes.

triangle-exclamation

Using the JWT, you can call the gateway microservice GraphQL endpoint confirmRegistration resolver.

You can decode the JWT and retrieve the internal record uuid - the variable id used in the payload.

Last updated