opencrvs / opencrvs-core

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

Remove Certified and Issued statuses from the UI and replace with Registered #6358

Open jpye-finch opened 11 months ago

jpye-finch commented 11 months ago

Write to consider all status (sub status/flags) and available actions as each status...

Description

Currently we use the copy "Certified" and "Issued" on the Record Audit page for Statuses.

This ticket is to:

Image

High-level status flow digram: https://www.figma.com/file/MpIAfLSCAGAVKBbciSNHrT/Status-WorkFlow?type=whiteboard&node-id=1630-615&t=dRkNxmdOSqFvVDJB-4

Acceptance criteria

GIVEN I am a Registrar WHEN I register a record THEN set the status as Registered

GIVEN I am a Registrar/ Reg Agent WHEN I print a certificate THEN the status remains Registered

GIVEN I am a Registrar/ Reg Agent WHEN I print and issue a certificate THEN the status remains Registered

GIVEN I am a Reg Agent WHEN I request a correction THEN the set the status to Pending Correction

Dev tasks

Let's start clarifying the distinction between statuses and actions. Task in Hearth should represent an action whereas body.type in Elasticsearch represents a status of the record. Status can be derived from actions but not the other way around.

In this task, workflow will most likely experience very few changes, except for if there are status checks that verify the record is wither REGISTER, CERTIFIED or ISSUED. We still want to keep these actions showing in Task and Task history just as they are there today.

jpye-finch commented 2 months ago

Commenting for reference.

We are considering adding Custom Status Flags. To support custom workflows

ie. Status: Ready for review Flag(s): Requires Senior Registrar Approval Flag Trigger: Conditionally on how the form was completed (eg. missing a document)/ or type of correction Implication: Record can not be registered by Registrar. Registrar must send for approval

Would print and issue become flags associated with the registered record? Status: Registered Flag(s): Certificate 1 printed, Certificate 1 issued

naftis commented 2 months ago

Given the "Issued" -workqueue is currently an advanced search which checks for CERTIFIED status:

    issueTab: searchEvents(
      advancedSearchParameters: {
        declarationLocationId: $declarationLocationId
        registrationStatuses: ["CERTIFIED"]
      }
      count: $pageSize
      skip: $issueSkip
    ) {
      totalItems
      results {
        ...EventSearchFields
      }
    }

Are we deprecating the workqueue or what's the way to figure out the records in Issued workqueue?

Would we need to create a way to search records which have certain actions been performed to them?

naftis commented 2 months ago

Re: the technical design, we need to be careful when editing getStatusFromTask as we're using it also to write the status to Task, not only determining the registration status from the Task itself: https://github.com/opencrvs/opencrvs-core/blob/c74a255a51d87ee7142dd92602547d7e0d89842f/packages/workflow/src/records/fhir.ts#L1092

naftis commented 2 months ago

Is the idea here to create a smoke-and-mirrors approach like the description says or are we overhauling the status/action relationship? The high-level estimate is small. I moved this back to design to discuss the ticket before starting implementation.

@rikukissa @jpye-finch

jpye-finch commented 1 month ago

Smoke and mirrors. Until we have scoped out and aligned on the concept of record 'flags' : https://www.figma.com/board/kbRxrSeitNzGahyojbdLM5/OpenCRVS-Roadmap?node-id=229-3270&t=Z6ildIF0uG22YUFu-4