Part B – Software Requirements Specification (SRS)

  1. Functional Requirements

FR-01 – Visit ID Creation

Trigger: TB Symptoms Screening completion.

The system shall:

  1. Verify completion of TB Symptoms Screening.
  2. Generate a unique Visit ID.
  3. Associate the Visit ID with the Beneficiary ID.
  4. Store creation date/time.
  5. Make the Visit ID available for diagnostic orders.

FR-02 – Create Truenat Order

When a new Truenat referral is generated, the system shall:

  1. Identify the Beneficiary.
  2. Identify the active/relevant Visit ID.
  3. Determine the required Test Type.
  4. Generate a unique Test Order ID.
  5. Set Order Status = Pending.
  6. Record Order Date and Time.
  1. FR-03 – Test Order Data

Each Test Order should contain, at minimum:

Field

Description

Order ID

Unique test order identifier

Beneficiary ID

Beneficiary reference

Visit ID

Visit reference

Test Type

MTB / RIF

Order Date

Order creation date

Order Time

Order creation time

Status

Pending / Completed / Closed

Result

Final test result

Result Source

Manual / Automated

Result Date/Time

Result capture timestamp

Parent Order ID

Previous order for repeat test

Attempt Number

Repeat attempt sequence

Closure Reason

Reason for closure

Created By

User/system

Updated By

User/system


  1. FR-04 – MTB Result Processing

The system shall process MTB results as follows:

MTB Result

Order Status

Action

TB Positive

Completed

Create RIF Order

TB Negative + X-Ray Normal

Completed

No further action

TB Negative + X-Ray Abnormal

Completed

Clinical Assessment & Diagnosis

TB Negative + X-Ray TB Presumptive

Completed

Clinical Assessment & Diagnosis

Invalid / Error

Closed

Create new MTB Order


  1. FR-05 – RIF Result Processing

RIF Result

Order Status

Action

DR TB

Completed

Confirmed DR-TB + Treatment Referral

Non-DR TB

Completed

Confirmed TB + Treatment Referral

Indeterminate

Completed

Clinical Assessment & Diagnosis

Invalid / Error

Closed

Create new RIF Order

  1. FR-06 – Result Source

The system shall record whether each result originated from:

This field shall be non-editable for automated results unless authorized correction functionality is specifically provided.

  1. FR-07 – Automated Result Integration

For integrated Truenat devices, the system shall:

  1. Receive the test result.
  2. Identify the corresponding Test Order ID.
  3. Validate the order.
  4. Validate the test type.
  5. Validate the result.
  6. Save the result.
  7. Update the order status.
  8. Trigger the applicable workflow.
  9. Record integration/device information.

Integration Validation

The system should reject or flag results when:

Such exceptions shall be logged for operational resolution.

  1. FR-08 – Manual Result Entry

Authorized users shall be able to:

  1. Search Beneficiary.
  2. Select Visit.
  3. View Pending Truenat Orders.
  4. Select MTB/RIF Order.
  5. Enter valid result.
  6. Save result.
  7. Trigger the applicable business rule.

The system shall not allow an invalid result value outside the configured result list.

  1. FR-09 – Invalid/Error Processing

For both MTB and RIF:

Invalid / Error

       │

       ▼

Save Result

       │

       ▼

Close Current Order

       │

       ▼

Create New Order

       │

       ▼

Parent Order = Previous Order

       │

       ▼

New Order = Pending

       │

       ▼

Repeat Test

The application shall maintain the complete sequence of attempts.

  1. FR-10 – Test Not Conducted

The system shall provide a Test Not Conducted action.

When selected:

  1. FR-11 – EoD Job

The application shall provide an automated EoD process.

Suggested processing logic

FOR each Truenat Test Order

    IF Order Status = Pending

       AND Order Date is eligible for EoD closure

    THEN

       IF Test Not Conducted

          Close Order

       ELSE IF Result Not Entered

          Close Order

       ELSE IF final Invalid/Error

          Close Order

       END IF

    END IF

END FOR

The EoD process shall record:

  1. FR-12 – Re-Order

For a Closed order, the system shall provide:

Create New Test Order

The new order shall not overwrite the previous order.

Example:

M001 – Closed

     │

     ▼

Create New Order

     │

     ▼

M002 – Pending


  1. FR-13 – Order Status State Machine

                   ┌───────────────┐

                   │     CREATE    │

                   └───────┬───────┘

                           ▼

                    ┌─────────────┐

                    │   PENDING   │

                    └──────┬──────┘

                           │

              ┌────────────┼─────────────┐

              │            │             │

              ▼            ▼             ▼

        Valid Result    Invalid/Error  Not Conducted

              │            │             │

              ▼            ▼             ▼

         COMPLETED       CLOSED        CLOSED

                           │

                           ▼

                     New Test Order

                           │

                           ▼

                        PENDING


  1. FR-14 – Treatment Referral

For RIF results indicating a confirmed TB case:

DR TB

RIF = DR TB

     ↓

Confirmed DR-TB

     ↓

Treatment Referral

Non-DR TB

RIF = Non-DR TB

     ↓

Confirmed TB

     ↓

Treatment Referral

The treatment/referral workflow should be configurable according to the applicable TB program protocol.

  1. FR-15 – Clinical Assessment Referral

The system shall generate a Clinical Assessment & Diagnosis referral when:

Scenario 1

MTB = Negative

+

Chest X-Ray = Abnormal but not TB Presumptive

Scenario 2

MTB = Negative

+

Chest X-Ray = TB Presumptive

Scenario 3

RIF = Indeterminate

The referral shall be recorded against the beneficiary and Visit ID.


  1. FR-16 – Audit Trail

The system shall maintain an audit trail for:

  1. Non-Functional Requirements

NFR-01 – Data Integrity

Every test result must be traceable through:

Beneficiary ID → Visit ID → Test Order ID → Test Result → Next Action

NFR-02 – Security

Only authenticated and authorized users shall be able to:

NFR-03 – Auditability

Closed orders and previous test attempts shall not be deleted during normal application operations.

NFR-04 – Integration Reliability

Automated device results shall be processed only after successful identification and validation of the associated Order ID.

Failed or unmatched device transactions shall be logged as integration exceptions.

NFR-05 – Offline Camp Operation

Where the camp application operates offline, the Truenat workflow shall support local data capture and processing. Synchronization with the central application shall occur when connectivity becomes available, according to the overall TB Screening Camp offline/online architecture.

  1. Complete Business Workflow

                TB SYMPTOMS SCREENING

                        │

                        ▼

                  CREATE VISIT ID

                        │

                        ▼

                TRUENAT REFERRAL

                        │

                        ▼

                CREATE MTB ORDER

                        │

                        ▼

                 MTB = PENDING

                        │

             ┌──────────┴──────────┐

             │                     │

             ▼                     ▼

      Manual Result          Automated Result

             │                     │

             └──────────┬──────────┘

                        ▼

                  MTB TEST RESULT

                        │

       ┌────────────────┼──────────────────┐

       │                │                  │

       ▼                ▼                  ▼

   TB Positive       TB Negative       Invalid/Error

       │                │                  │

       ▼                ▼                  ▼

 Create RIF       Check X-Ray       Close MTB Order

   Order               │                  │

       │         ┌──────┴──────┐           ▼

       │         │             │      Create New MTB

       │       Normal       Abnormal    Order for Repeat

       │         │             │

       │         ▼             ▼

       │      No Action   Clinical Assessment

       │                    & Diagnosis

       ▼

   RIF TEST

       │

       ├───────────────┬──────────────┬──────────────┐

       ▼               ▼              ▼              ▼

     DR TB          Non-DR TB     Indeterminate   Invalid/Error

       │               │              │              │

       ▼               ▼              ▼              ▼

 Confirmed          Confirmed      Clinical       Close RIF

  DR-TB              TB           Assessment       Order

       │               │              │              │

       └───────┬───────┘              │              ▼

               ▼                      │        Create New RIF

       Treatment Referral             │        Order for Repeat

                                      │

                                      ▼

                             Clinical Assessment

                                & Diagnosis


                         ┌────────────────────┐

                         │      EoD           │

                         │  Open/Pending      │

                         │  Orders Reviewed   │

                         └─────────┬──────────┘

                                   ▼

                              CLOSE ORDERS


  1. Business Rule Summary

ID

Business Rule

BR-01

Visit ID is created after TB Symptoms Screening is completed.

BR-02

Every new Truenat referral creates a unique Test Order ID.

BR-03

One Visit ID can have multiple Test Order IDs.

BR-04

Every Test Order is valid for one calendar day.

BR-05

New orders start with Pending status.

BR-06

Valid completed results change Order Status to Completed.

BR-07

Invalid/Error does not result in Completed status.

BR-08

MTB Positive creates a RIF Test Order.

BR-09

MTB Negative + Normal Chest X-Ray requires no further action.

BR-10

MTB Negative + abnormal/TB-presumptive Chest X-Ray requires Clinical Assessment & Diagnosis.

BR-11

MTB Invalid/Error closes current order and creates a new MTB order for repeat testing.

BR-12

RIF DR TB flags Confirmed DR-TB and triggers treatment referral.

BR-13

RIF Non-DR TB flags Confirmed TB and triggers treatment referral.

BR-14

RIF Indeterminate triggers Clinical Assessment & Diagnosis.

BR-15

RIF Invalid/Error closes current order and creates a new RIF order for repeat testing.

BR-16

Test Not Conducted requires a mandatory reason.

BR-17

Test Not Conducted results in Order Status = Closed.

BR-18

Applicable Pending/open orders are closed at EoD.

BR-19

Closed orders cannot be reused.

BR-20

A new order can be created from the beneficiary record after closure.

BR-21

Previous and repeat orders must remain independently traceable.

BR-22

Manual and automated results must follow the same business rules.

BR-23

All orders, results, referrals, repeats and closures must be auditable.


  1. Recommended Order History Design

For repeat testing, I recommend not overwriting the original Order ID. Instead, maintain an order chain.

Example – MTB Invalid Result

Visit ID: V10001

      │

      ├── MTB Order M10001

      │       Result: Invalid/Error

      │       Status: CLOSED

      │

      ├── MTB Order M10002

      │       Parent: M10001

      │       Result: Invalid/Error

      │       Status: CLOSED

      │

      └── MTB Order M10003

              Parent: M10002

              Result: TB Positive

              Status: COMPLETED

              │

              ▼

          Create RIF Order

This design provides complete traceability of initial test → repeat test → final result → next action and is particularly useful for camp-level audit, reporting, troubleshooting, and clinical review.