Coding Workflow (Step 1 & 2)

Quick Guide for Medical Officers & Reviewers (Plain Language)

As a Medical Officer or Medical College Mentor, your clinical judgment translates the family's verbal autopsy story into an authoritative cause of death. Here is how your coding and review work flows:

1. Reaching Your Coding Queue ("Within Area" & Choosing Cases)
  • Within Area Scope: Your coding queue automatically shows deaths belonging to your assigned health facility, block, or district (or designated cross-facility roster). You do not see cases from other areas.
  • Start Next Random Case: DigitVA automatically allocates the next eligible case from your area pool. This balances workloads across doctors and avoids selection bias.
  • Pick a Case: If your project allows picking, you can browse eligible deaths in your area queue and select a specific case to code.
2. Step 1 (Initial Assessment)
  • Clinical Review: Read the family's open narrative, review the deceased's medical history, and examine reported symptoms categorized by organ system.
  • Narrative Quality Assessment (NQA): If enabled, score the clarity and completeness of the field worker's narrative notes to help improve interview quality.
  • Initial Cause of Death: Record your initial clinical impression of the sequence leading to death and click Save Step 1.
3. Step 2 (Final Cause of Death)
  • Confirming the ICD Code: Search and select the validated WHO ICD-10 or ICD-11 code representing the underlying cause of death. (In ICD-11 projects, the built-in DORIS assistant suggests matching causes based on international coding rules).
  • Submitting: Click Finalize COD to save your authoritative cause of death determination.
4. The Correction Window ("Recode")
  • If you realize you made an oversight or want to re-evaluate after thinking further, you have a correction window (24 hours unless the project sets otherwise). During this window, you can reopen your case (via Recode) and update your cause of death.
5. Stage 4: Independent Quality Review
  • Once the correction window closes, the case becomes eligible for secondary quality review. A Senior Medical Officer or Medical College Reviewer independently evaluates a sample of cases and records their own cause of death. The first coder's decision is shown to the reviewer as read-only reference.
6. When a Case Cannot be Coded
  • Not Codeable: If the narrative is completely uninformative or the respondent did not know the deceased's illness, you can mark the case as Not Codeable with a structured medical reason.
  • Send back for revision: If vital details are missing but can be clarified by contacting the family again, supervisors or data managers can reopen the interview and send it back to the field worker for revision.

Overview

The coding workflow is the core production path in DigitVA. It takes a synced verbal autopsy submission from intake through coder assessment, optional recode, and optional reviewer secondary coding, producing an authoritative Cause of Death (COD) determination.

Step 1: Pre-Coding Pipeline

Before a submission reaches a coder, it passes through several automated stages:

  1. Sync — submission data is pulled from ODK Central.
  2. Consent check — submissions without valid consent are marked consent_refused and excluded from the coding queue. If ODK data is later updated with valid consent, the submission automatically re-enters the pipeline.
  3. Attachment sync — state becomes attachment_sync_pending while attachments are fetched for the current payload.
  4. SmartVA generation — state becomes smartva_pending. The system attempts to generate SmartVA output. This gate must complete (generate, regenerate, or explicitly fail) before the submission moves forward.
  5. Ready for coding — state becomes ready_for_coding. The submission is now in the coder pool.
Screening: Projects may optionally enable a screening_pending gate where a data manager reviews submissions before they enter the SmartVA pipeline. Screening is project-configured.

Step 2: Starting to Code

Each project uses one of two coder-intake modes:

  • Random allocation (POST /coding/start) — the system assigns one eligible submission from the project pool. The coder does not browse or choose.
  • Pick and choose (POST /coding/pick/<va_sid>) — the coder browses eligible submissions and explicitly starts coding on a chosen case.

Both modes exclude submissions that are not codeable, already finalized, or currently allocated to another coder.

Coder entry is subject to project-level coding gates: coding_enabled, coding_start_date, coding_end_date, and per-site daily_coder_limit. The coding_tester role bypasses these gates for testing.

Once coding starts, the submission enters coding_in_progress and the coder receives a 1-hour allocation.

Step 3: Step 1 (Initial Assessment)

The coding interface displays submission categories in the left sidebar. The coder reviews the VA narrative and supporting data:

  1. Review categories — browse submission data organized by category (demographics, medical history, symptoms, etc.).
  2. Narrative Quality Assessment (NQA) — if the project has NQA enabled, the coder must complete a scored assessment of the narrative quality before proceeding.
  3. Social Autopsy Analysis — if the project has Social Autopsy enabled, the coder must complete a three-level delay factor assessment (decision, reaching care, receiving care) before proceeding.
  4. Submit Step 1 — the coder submits an initial COD assessment via the Step 1 button. The workflow state becomes coder_step1_saved.
ICD-11 projects. An ICD-11 project always codes the cause of death through DORIS. When the project hides SmartVA until Step 2 (masked coding), Step 1 is the medical certificate of cause of death: enter it, process it with DORIS, and confirm your own underlying cause, either DORIS's suggestion or a code you choose. SmartVA is not shown in Step 1. Part I line 1 is saved as the immediate cause.
Step 1 is not the final COD. It is an intermediate assessment. The submission remains allocated to the coder for completion of Step 2.

Step 4: Step 2 (Final Assessment)

After Step 1 is saved:

  1. Review all categories and initial assessment — the coder revisits the submission data and their Step 1 assessment.
  2. Select ICD-10 cause of death code — the coder searches and selects a specific ICD-10 code. Only codes allowed by WHO VA coding allowability rules are available (see ICD-10 Codes help page). In an ICD-11 project with masked coding, Step 2 shows the SmartVA result and your Step 1 DORIS result, and you confirm the final underlying cause: your Step 1 underlying cause, the SmartVA result, or your own ICD-11 code found through the search. There is no second certificate.
  3. Submit final COD — the coder submits the final assessment. The workflow state becomes coder_finalized.

Upon finalization, the coding allocation is released and the submission is marked as complete from the coder workflow perspective. Step 1 is preserved alongside the final COD for audit purposes.

Step 5: Recode Window

After coder finalization, there is a recode window (set per project, 24 hours by default) during which the coder may reopen the case and change their COD determination.

  • The existing finalized COD remains authoritative until a replacement is saved.
  • NQA and Social Autopsy artifacts persist across recode attempts.
  • Incomplete recode work does not replace the existing finalized COD.

When the window closes, the submission transitions to reviewer_eligible and the coder can no longer recode.

Step 6: Reviewer Pipeline

Reviewer coding is optional and sample-based. Not every coder-finalized case enters the reviewer track.

  1. Reviewer eligible — after the recode window closes, the state becomes reviewer_eligible.
  2. Reviewer coding — a reviewer picks up the case and codes independently. The state becomes reviewer_coding_in_progress.
  3. Reviewer finalization — the reviewer submits their own COD. The state becomes reviewer_finalized.

With masked coding the reviewer also works in two steps and sees SmartVA only in Step 2, in ICD-10 and ICD-11 projects alike. In an ICD-11 project the reviewer's Step 1 certificate starts as a copy of the coder's; the reviewer edits it, processes it with DORIS and confirms their own underlying cause, then confirms the final cause in Step 2 with the same three choices as the coder. The coder's record is never changed.

Reviewer authority: The reviewer final COD takes precedence over the coder final COD. The original coder decision is preserved in history as a superseded record.

Not Codeable

At any point during active coding (states coding_in_progress, coder_step1_saved), the coder can mark a submission as Not Codeable:

  • A structured reason is required.
  • The submission enters not_codeable_by_coder and is excluded from the coder allocation pool.
  • A best-effort update is sent to ODK Central (hasIssues flag).

Separately, a data manager may mark a submission as not_codeable_by_data_manager from the screening or ready pool. This is a data-quality exclusion, not a coding outcome.

Stale Allocation Timeout

Active coding and reviewing allocations older than 1 hour are considered stale and are automatically released:

Session Type On Timeout
First-pass coder Deactivates incomplete artifacts (NQA, Social Autopsy). Resets to ready_for_coding.
Recode session Abandons the recode episode. Preserves the currently authoritative final COD. Resets to coder_finalized.
Reviewer session Deactivates all reviewer artifacts (reviews, NQA, Social Autopsy). Resets to reviewer_eligible.

Timeout cleanup runs hourly as a scheduled background task and also opportunistically when a coder or reviewer starts a new session.

Protected States

The following states are protected from automatic ODK data changes. When ODK data changes for a submission in one of these states, the system does not automatically overwrite the existing COD:

  • coder_finalized
  • reviewer_eligible
  • reviewer_coding_in_progress
  • reviewer_finalized
  • finalized_upstream_changed

For finalized cases where ODK data has changed, the submission enters finalized_upstream_changed and requires manual resolution by a data manager or admin:

  • Accept And Recode — promotes new ODK data, transitions to smartva_pending to rerun SmartVA, then returns to ready_for_coding for recoding.
  • Keep Current ICD Decision — promotes new ODK data but preserves the current COD determination.

Complete Workflow States

The canonical workflow states in order (15 total, including legacy compatibility):

# State Description
1consent_refusedNo valid consent; excluded from coding
2screening_pendingAwaiting data manager screening (optional)
3attachment_sync_pendingAttachments being synced for current payload
4smartva_pendingAwaiting SmartVA generation
5ready_for_codingIn the coder allocation pool
6coding_in_progressCoder has an active allocation
7coder_step1_savedInitial COD assessment saved
8coder_finalizedFinal COD submitted by coder
9reviewer_eligibleRecode window closed; eligible for reviewer
10reviewer_coding_in_progressReviewer has an active allocation
11reviewer_finalizedReviewer final COD submitted
12finalized_upstream_changedODK data changed after finalization, or a web/device interview sent back or reopened for its interviewer's revision (shown as “Sent back for revision”)
13not_codeable_by_coderCoder marked as not codeable
14not_codeable_by_data_managerData manager marked as not codeable
15partial_coding_savedLegacy compatibility state for older partial saves