Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This document defines the process for automatically generating plans and tasks when an index case comes in from the BIOPHICS system. This document will remain as the source for sample templates as they are developed by the consortium. (Reference)


Scoping Details

Responsible Person:Christina Riley
Other parties to review/input:


FYI:


Targeted release date:date
Jira Status:
ticket link

The responsible person owns this feature from scoping to tracking development by Ona and providing clarifications if needed, to testing and sign off.  Status

Status


#
Step
Status
1Responsible prepares rough business analysis/reqs doc
2Get CHAI review
3Get Akros Review
4Get Ona feedback


5Responsible - 1 iteration for feedback


6Ona sign off
7Ona tech spec scoping
8Ona LOE 
9Ona scheduling


Table of Contents

High Level Steps

  • Index Case arrives in BIOPHICS
  • Nifi queries the BIOPHICS system on a regular schedule and identifies that a new index case has arrived
  • Nifi creates the event in the server as defined in the Index Case Confirmation workflow
  • Nifi creates a plan based on the details of the case classification
  • Nifi POSTs this plan to Reveal
  • Nifi creates tasks for each plan action (up to 10 actions), performing business logic based on the code and Intervention Unit (Person, Residential Structure, Mosquito Collection Point, etc.)

Assumptions

We assume the following with this process:

...

For Planning - to be generated as drafts

Note
titleNew Scope

NEW Assumptions for Review

Craig Appl Annie Martinthe new assumptions below have been added based on recent conversations around missing scope pertaining to more than one FI plan being created when a case is linked to more than one foci (i.e. focus of infection and focus of residence), and when more than one index case is reported within the MIS for a given jurisdiction within a 20-day time period (i.e. how to deal with cases that would normally trigger an FI but an FI is already in progress).


Automation for case-triggered FIs when the Focus of Infection and the Focus of Residence are the SAME

If the BIOPHICS variables Focus_case_residence_classification_code and focus_Source_of_Infection_classification_code are the same, then the index case resides in the focus in which they acquired the malaria infection and only one plan needs to be generated and carried out in this focus (i.e. this is a local case). For the purposes of Thailand, local cases are defined as being from within the same focus (i.e. sub-village), as confirmed by Pedro.

The assumptions for this type of scenario are in-line with the original assumptions described above.


Automation for case-triggered FIs when the Focus of Infection and the Focus of Residence are NOT THE SAME

**Section in progress**

If the BIOPHICS variables Focus_case_residence_classification_id and Focus_Source_of_Infection_classification_id are NOT the same, then the index case resides in a focus other than the focus in which they acquired the malaria infection. This means that two plans need to be generated - one plan for each focus. By definition, the case classification will be considered local for the focus of infection and imported for the focus of residence. The case classification variable that is imported from BIOPHICS is classified in relation to the focus of diagnosis/residence. Christina Riley verifying that 'focus of residence' & 'focus of diagnosis' are considered the same in regard to the Thai Protocol & BIOPHICS classification.

For the purposes of Thailand, local cases are defined as being from within the same focus (i.e. sub-village), as confirmed by Pedro.

  • **The assumption that one plan is created for each index case that arrives is broken; a plan should be generated for each focus associated with the index case
  • A unique plan should be created for each focus. The plan generated for each focus is based on the given focus's focus classification and the case classification as defined by how the index case is associated with each focus.
  • New assumptions:
    • Focus classification defined - we have two focus types which each have their own variable for focus classification. These variables are the focus-type-specific equivalent of fiStatus variable.
      • Focus of Infection: focus_Source_of_Infection_classification_code (BIOPHICS); responses (A1, A2, B1, B2)
      • Focus of Residence: Focus_case_residence_classification_code (BIOPHICS); responses (A1, A2, B1, B2)
    • Case classification defined - cases can be classified as either local (indigenous) or imported. The caseClassification variable is imported from BIOPHICS and is classified in relation to the focus of diagnosis. 
      • Focus of Infection: there is no source of infection-specific variable for the focus of infection; by definition this is considered 'Local' and should be hard-coded as 'Local'
      • Focus of Residence: caseClassification (BIOPHICS); responses (Local, Imported)
    • Plan generation criteria defined - each plan should be generated according to the following variables/criteria:
      • Focus of Infection: focus_Source_of_Infection_classification_code + hard-coded classification as 'Local'
      • Focus of Residence: Focus_case_residence_classification_code + caseClassification
  • Additional items needed in detail view Craig Appl - I've added these in the Active_FI_Detail_View tab of the Reveal Web UI & Reporting Data Dictionary
    • Focus type - defined as either the Focus of Infection or the Focus of Residence
    • Focus of Infection name: Focus_Source_of_Infection_name (BIOPHICS); show if focusType== 'Focus of Residence'
    • Focus of Residence name: Focus_case_residence_name (BIOPHICS); show if focusType== 'Focus of Infection'


Automation for case-triggered FIs when more than one index case is reported from the MIS in the same jurisdiction with an active plan (plans are active for 20 days from the 1st reported index case)

**Section in progress**

  • The first assumption that one plan is created for each index case that arrives is broken; any index case that arrives in a jurisdiction that already has an active plan that has been case-triggered does not generate an additional plan.
  • The number of index cases reported in the jurisdiction over the time period of the active plan should be counted, with the initial index case counted as '1'.
    • Jurisdiction is defined as the focus area with the active plan; if two plans have been generated for a given index case then each jurisdiction will have a unique count for additional cases reported within that jurisdiction for the active time period.

Sample Index Case Classification Form from BIOPHICS

This section contains the sample Index Case Classification form that's currently in BIOPHICS. This will be the original source for which business logic is defined.

...

Code Block
"clients": [],
 "no_of_events": 0,
 "events": [
   {
     "identifiers": {},
     "baseEntityId": "2301110301",
     "eventDate": "2018-11-06T00:00:00.000+0000",
     "eventType": "Case Details",
     "formSubmissionId": "81604cb9-1911-4b05-b92f-c4a7ee310b25",
     "providerId": "nifi-user",
     "duration": 0,
     "entityType": "Case Details",
     "details": {
        "family_name": "สมัครสุนทร",
        "focus_id": "2301110301",
        "focus_name": "ท่ากุ่มบน(ชายเขา)",
        "surname": "สมัครสุนทร",
        "first_name": "แล้",
        "age": "22",
        "case_number": "141410007601031181107101758977",
        "case_classification": "Bz",
        "focus_status": "B1",
        "focus_reason": "Investigation",
        "species": "V",
        "investigtion_date": "2018-11-06T00:00:00.000+0000",
        "ep1_create_date" : "2018-11-07T10:10:27.673+0000",
        "ep3_create_date" : "2018-11-07T10:17:58.977+0000",
        "house_number" : "161"
     },
     "version": 1557860282617,
     "teamId": "",
     "dateCreated": "2018-11-07T10:17:58.977+0000",
     "type": "Event"
   }
 ]
}

Case Classification Business Logic

This section defines the business logic and relationship to the templates below.

CasePseudocode LogicTemplate Number
1

If (focus_status == A1 OR focus_status == A2)

then (choose Template 1)

1
2

If (focus_status == B1 )

then (choose Template 2)

2
3

If ((focus_status == B1 OR focus_status == B2) AND (case_classification == local) AND (historical_interventions == IRS))

then (choose template 3)

3
4

If ((focus_status == B1 OR focus_status == B2) AND (case_classification == local) AND (historical_interventions == Blood Screening))

then (choose template 4)

4
5

If (focus_status == NULL)

then (figure out based on case classification)


Unaccounted for Case Classification Scenarios

There are a number of unaccounted for case classification scenarios that we need to add to this document. (This section should be deleted when this document is finalized.)

  1. How do we trigger routine interventions? The BIOPHICS system only has case-triggered interventions. What will be the input before we have a user interface in FI planning?
    1. @Janette - These will be triggered via a button on the WebUI. There will need to be some discussion with Craig Appl, Matt Berg and @Kelvin about how this will integrate with your current NiFi process.
  2. Is there such a thing as an imported case classification for a B2 focus_status? (This doesn't appear to be covered in the templates)
    1. The answer is that an imported case could not transmit in a B2 focus_status, so no plan should be generated.
  3. Where will we get the historical intervention information IRS or Blood Screening? This information does not come in on the case classification form.
    1. We do NOT need to get the historical intervention information, Reveal will build up a history of interventions as these are carried out using the tool, but we don't need to import any from Biophics.

Case Classification Options

The case_classification field can have the following options. We need to map these against 'local' and 'imported' as defined above.

ValueType (Local/Imported)Local/Imported

A

Indigenous (same village)Local
BxImported - from different village within same sub-districtImported
ByImported - from different sub-district within same districtImported
BzImported - from different district within same provinceImported
BoImported - from a different provinceImported
BfImported - from a different countryImported
CRelapse case (Same infection - only for Pv & Po) Imported
DInduced case (received parasites from blood transfusion)Imported
EIntroduced case (local infection but associated with imported case)Imported
 FUnclassified - staff unable to classify as A, B, C, D, or ELocal



Plan Action Time Periods

This section defines time periods for all plans:

  • Plan Execution Period
    • Start: Today
    • End: Today + 20 days
  • Actions
    • Index Case Confirmation
      • Start: Plan Start
      • End: Plan Start + 10 days
    • Family Registration
      • Start: Plan Start
      • End: Plan Start + 20 days
    • Bednet Distribution
      • Start: Plan Start
      • End: Plan Start + 20 days
    • RACD Blood screening
      • Start: Plan Start
      • End: Plan Start + 20 days
    • Larval Dipping
      • Start: Plan Start
      • End: Plan Start + 20 days
    • Mosquito Collection
      • Start: Plan Start
      • End: Plan Start + 20 days
    • Behavior Change Communication
      • Start: Plan Start
      • End: Plan Start + 20 days

Nifi Business Logic to be Developed

This section defines the business logic that needs to be implemented in Nifi given the variables above.

...

  • Monitor the /rest/plans endpoint to see if a plan was converted from draft to active
  • Load the plan into the flowfile
  • Extract up to 10 plan actions into individual values (This is done in this processor)
  • Process each plan action and route them to the appropriate flows based on the Action.subjectCodableConcept
    • Codes that need to be evaluated on each location within the jurisdiction: Residential Structure (i.e. Bednet Distribution, IRS and RACD Register Family), Larval Breeding Site and Mosquito Collection Point
      • Extract the jurisdiction so we can query the API and get all of the locations within that jurisdiction
      • Clear the flowfile
      • GET all of the locations within a jurisdiction at /rest/location/sync
      • Split the results so you can act on each location within the jurisdiction
      • Save the location properties as attributes for future reference
      • Filter out locations that are "Inactive"
      • Create duplicate flow files for each action, so each location is evaluated against each action. (i.e. only mosquito collection points are meant for mosquito collection actions or residential structures are only evaluated against register family events)
      • Perform the following logic based on the Action.subjectCodableConcept
        • Residential Structure
          • Query to see if there is a family registered at this location. (ENDPOINT TBD)
            • Action.code: Bednet Distribution
              • If a family IS NOT registered at this location
                • Do nothing because the RACD Register Family task will automatically create a bednet distribution task in the Android client when the family is registered
              • If a family IS registered at this location
                • Create a bednet distribution task at this location

                  Code Block
                  languagejs
                  titleSample Bednet Distribution Task template
                  linenumberstrue
                  collapsetrue
                  {
                    "identifier": "${UUID()}",
                    "planIdentifier": "${planIdentifier}",
                    "groupIdentifier": "${location.properties.parentId}",
                    "status": "Ready",
                    "businessStatus": "Not Visited",
                    "priority": 3,
                    "code": "${planActionCode}",
                    "description": "${planActionDescription}",
                    "focus": "${planActionIdentifier}",
                    "for": "${location.id}",
                    "executionStartDate": "${planActionTimingPeriodStart}",
                    "executionEndDate": "${planActionTimingPeriodEnd}",
                    "owner": "${taskOwner}",
                    "note": null
                  }


            • Action.code: RACD Register Family
              • If a family IS NOT registered at this location
                • Create a RACD Register Family task

                  Code Block
                  languagejs
                  titleSample RACD Register Family Task Template
                  linenumberstrue
                  collapsetrue
                  {
                    "identifier": "${UUID()}",
                    "planIdentifier": "${planIdentifier}",
                    "groupIdentifier": "${location.properties.parentId}",
                    "status": "Ready",
                    "businessStatus": "Not Visited",
                    "priority": 3,
                    "code": "${planActionCode}",
                    "description": "${planActionDescription}",
                    "focus": "${planActionIdentifier}",
                    "for": "${location.id}",
                    "executionStartDate": "${planActionTimingPeriodStart}",
                    "executionEndDate": "${planActionTimingPeriodEnd}",
                    "owner": "${taskOwner}",
                    "note": null
                  }


              • If a family IS registered at this location
                • Do nothing
          • Action.code: Case Confirmation (Only if the house number from the case classification was found in the system)
            • Create a case confirmation task

              Code Block
              languagejs
              titleSample Case Confirmation Task template (on residential structure)
              linenumberstrue
              collapsetrue
              {
                "identifier": "${UUID()}",
                "planIdentifier": "${planIdentifier}",
                "groupIdentifier": "${location.properties.parentId}",
                "status": "Ready",
                "businessStatus": "Not Visited",
                "priority": 3,
                "code": "${planActionCode}",
                "description": "${planActionDescription}",
                "focus": "${planActionIdentifier}",
                "for": "${location.id}",
                "executionStartDate": "${planActionTimingPeriodStart}",
                "executionEndDate": "${planActionTimingPeriodEnd}",
                "reasonReference": "${openSRP_Case_Classification_Event_id}",
                "owner": "${taskOwner}",
                "note": null,
                "serverVersion": 0
              }


        • Larval Breeding Site
          • Criteria: ${location.properties.type:equals('Larval Breeding Site')}
          • Action.code: Larval Dipping 
            • Create a larval dipping task

              Code Block
              languagejs
              titleLarval Dipping Task Template
              linenumberstrue
              collapsetrue
              {
                "identifier": "${UUID()}",
                "planIdentifier": "${planIdentifier}",
                "groupIdentifier": "${location.properties.parentId}",
                "status": "Ready",
                "businessStatus": "Not Visited",
                "priority": 3,
                "code": "${planActionCode}",
                "description": "${planActionDescription}",
                "focus": "${planActionIdentifier}",
                "for": "${location.id}",
                "executionStartDate": "${planActionTimingPeriodStart}",
                "executionEndDate": "${planActionTimingPeriodEnd}",
                "owner": "${taskOwner}",
                "note": null
              }


        • Mosquito Collection Point
          • Criteria: ${location.properties.type:equals('Mosquito Collection Point')}
          • Action.code: Mosquito Collection
            • Create a mosquito collection task

              Code Block
              languagejs
              titleMosquito Collection Point Task Template
              linenumberstrue
              collapsetrue
              {
                "identifier": "${UUID()}",
                "planIdentifier": "${planIdentifier}",
                "groupIdentifier": "${location.properties.parentId}",
                "status": "Ready",
                "businessStatus": "Not Visited",
                "priority": 3,
                "code": "${planActionCode}",
                "description": "${planActionDescription}",
                "focus": "${planActionIdentifier}",
                "for": "${location.id}",
                "executionStartDate": "${planActionTimingPeriodStart}",
                "executionEndDate": "${planActionTimingPeriodEnd}",
                "owner": "${taskOwner}",
                "note": null
              }


    • Codes that need to be evaluated on each person registered in that jurisdiction: Person (i.e. Blood Screening)
      • Query all people in that jurisdiction
        • Action.code: RACD Blood Screening
          • Create a blood screening task for each person

            Code Block
            languagejs
            titleSample RACD Blood Screening Task
            collapsetrue
            {
              "identifier": "${UUID()}",
              "planIdentifier": "${planIdentifier}",
              "groupIdentifier": "${jurisdiction.id}",
              "status": "Ready",
              "businessStatus": "Not Visited",
              "priority": 3,
              "code": "${planActionCode}",
              "description": "${planActionDescription}",
              "focus": "${planActionIdentifier}",
              "for": "${client.baseEntityId}",
              "executionStartDate": "${planActionTimingPeriodStart}",
              "executionEndDate": "${planActionTimingPeriodEnd}",
              "owner": "${taskOwner}",
              "note": null
            }


    • Codes that need to be evaluated on the jurisdiction: Operational Area (i.e. BCC and Case Confirmation)
      • Action.code: BCC
        • Create a BCC task in the system

          Code Block
          languagejs
          titleSample BCC Task
          linenumberstrue
          collapsetrue
          {
            "identifier": "${UUID()}",
            "planIdentifier": "${planIdentifier}",
            "groupIdentifier": "${jurisdiction.id}",
            "status": "Ready",
            "businessStatus": "Not Visited",
            "priority": 3,
            "code": "${planActionCode}",
            "description": "${planActionDescription}",
            "focus": "${planActionIdentifier}",
            "for": "${jurisdiction.id}",
            "executionStartDate": "${planActionTimingPeriodStart}",
            "executionEndDate": "${planActionTimingPeriodEnd}",
            "owner": "${taskOwner}",
            "note": null
          }


      • Action.code: Case Confirmation (If the house number from the case classification event was not found in the system)
        • Create a case confirmation task for the operational area

          Code Block
          languagejs
          titleSample Case Confirmation Task (Operational Area)
          linenumberstrue
          collapsetrue
          {
            "identifier": "${UUID()}",
            "planIdentifier": "${planIdentifier}",
            "groupIdentifier": "${jurisdiction.id}",
            "status": "Ready",
            "businessStatus": "Not Visited",
            "priority": 3,
            "code": "${planActionCode}",
            "description": "${planActionDescription}",
            "focus": "${planActionIdentifier}",
            "for": "${jurisdiction.id}",
            "executionStartDate": "${planActionTimingPeriodStart}",
            "executionEndDate": "${planActionTimingPeriodEnd}",
            "reasonReference": "${openSRP_Case_Classification_Event_id}",
            "owner": "${taskOwner}",
            "note": null,
            "serverVersion": 0
          }


  • Post all tasks to the server ${opensrpBaseUrl}/rest/task

Plan Templates

This section includes the plan templates using the Nifi expression language.

For the purposes of plan automation, there are a total of six discrete, comprehensive protocols which have been translated into templates for the Thailand pilot. There are four protocols for case-triggered focus investigations (where fiReason==case-triggered); these protocols are dependent on the focus status (if fiStatus==A1 OR fiStatus==A2 OR fiStatus==B1 OR fiStatus==B2), the case classification (if case_classification==imported OR case_classification==local), and MAY be dependent on the historical vector control intervention employed (available in MIS). There are two protocols for routine focus interventions (where fiReason==routine); these protocols are dependent on the routine focus intervention selected (if actionCode==Bednet Distribution OR actionCode==Blood Screening).

Template 1: Local & Imported Case Triggered A1 & A2 - 7 Actions

Logic:

  • Case Triggered
  • There are 7 actions and goals
  • Case Classification Form Mapping

...

Code Block
languagejs
titleTemplate 1
linenumberstrue
collapsetrue
{
  "identifier": "${UUID()}",
  "version": "1",
  "name": "${focus_status}-${jurisdiction.name}-${now():format("yyyy-MM-dd", "GMT")}",
  "title": "${focus_status} - ${jurisdiction.name} - ${now():format("yyyy-MM-dd", "GMT")}",
  "status": "active",
  "date": "${now():format("yyyy-MM-dd", "GMT")}",
  "effectivePeriod": {
    "start": "${now():format("yyyy-MM-dd", "GMT")}",
    "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
  },
  "useContext": [
    {
      "code": "interventionType",
      "valueCodableConcept": "FI"
    },
    {
      "code": "fiStatus",
      "valueCodableConcept": "${focus_status}"
    },
    {
      "code": "fiReason",
      "valueCodableConcept": "Case-triggered"
    },
    {
      "code": "opensrpEventId",
      "valueCodableConcept": "${opensrpCaseClassificationEventId}"
    },
    {
      "code": "caseNum",
      "valueCodableConcept": "${case_number}"
    }
  ],
  "jurisdiction": [
    {
      "code": "${revealLocationId}"
    }
  ],
  "serverVersion": 0,
  "goal": [
    {
      "id": "Case_Confirmation",
      "description": "Confirm the index case",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Number of case confirmation forms complete",
          "detail": {
            "detailQuantity": {
              "value": 1,
              "comparator": ">=",
              "unit": "form(s)"
            }
          },
          "due": "${now():toNumber():plus(864000000):format("yyyy-MM-dd")}"
        }
      ]
    },
    {
      "id": "RACD_register_all_families",
      "description": "Register all families and family members in all residential structures enumerated or added (100%) within operational area",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Percent of residential structures with full family registration",
          "detail": {
            "detailQuantity": {
              "value": 100,
              "comparator": ">=",
              "unit": "Percent"
            }
          },
          "due": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
        }
      ]
    },
    {
      "id": "RACD_blood_screening_1km_radius",
      "description": "Visit all residential structures (100%) within a 1 km radius of a confirmed index case and test each registered person",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Number of registered people tested",
          "detail": {
            "detailQuantity": {
              "value": 50,
              "comparator": ">=",
              "unit": "person(s)"
            }
          },
          "due": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
        }
      ]
    },
	{
      "id": "RACD_bednet_dist_1km_radius",
      "description": "Visit 100% of residential structures in the operational area and provide nets",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Percent of residential structures received nets",
          "detail": {
            "detailQuantity": {
              "value": 90,
              "comparator": ">=",
              "unit": "Percent"
            }
          },
          "due": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
        }
      ]
    },
    {
      "id": "Larval_Dipping_Min_3_Sites",
      "description": "Perform a minimum of three larval dipping activities in the operational area",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Number of larval dipping forms submitted",
          "detail": {
            "detailQuantity": {
              "value": 3,
              "comparator": ">=",
              "unit": "form(s)"
            }
          },
          "due": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
        }
      ]
    },
    {
      "id": "Mosquito_Collection_Min_3_Traps",
      "description": "Set a minimum of three mosquito collection traps and complete the mosquito collection process",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Number of mosquito collection forms submitted",
          "detail": {
            "detailQuantity": {
              "value": 3,
              "comparator": ">=",
              "unit": "form(s)"
            }
          },
          "due": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
        }
      ]
    },
    {
      "id": "BCC_Focus",
      "description": "Complete at least 1 BCC activity for the operational area",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Number of BCC forms submitted",
          "detail": {
            "detailQuantity": {
              "value": 1,
              "comparator": ">=",
              "unit": "form(s)"
            }
          },
          "due": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
        }
      ]
    }
  ],
  "action": [
    {
      "identifier": "${UUID()}",
      "prefix": 1,
      "title": "Case Confirmation",
      "description": "Confirm the index case",
      "code": "Case Confirmation",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(864000000):format("yyyy-MM-dd")}"
      },
      "reason": "Investigation",
      "goalId": "Case_Confirmation",
      "subjectCodableConcept": {
        "text": "Operational Area"
      },
      "taskTemplate": "Case_Confirmation"
    },
    {
      "identifier": "${UUID()}",
      "prefix": 2,
      "title": "Family Registration",
      "description": "Register all families & family members in all residential structures enumerated (100%) within the operational area",
      "code": "RACD Register Family",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
      },
      "reason": "Investigation",
      "goalId": "RACD_register_all_families",
      "subjectCodableConcept": {
        "text": "Residential_Structure"
      },
      "taskTemplate": "RACD_register_families"
    },
    {
      "identifier": "${UUID()}",
      "prefix": 3,
      "title": "Blood screening",
      "description": "Visit all residential structures (100%) within a 1 km radius of a confirmed index case and test each registered person",
      "code": "Blood Screening",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
      },
      "reason": "Investigation",
      "goalId": "RACD_blood_screening_1km_radius",
      "subjectCodableConcept": {
        "text": "Person"
      },
      "taskTemplate": "RACD_Blood_Screening"
    },
	{
      "identifier": "${UUID()}",
      "prefix": 4,
      "title": "Bednet Distribution",
      "description": "Visit 100% of residential structures in the operational area and provide nets",
      "code": "Bednet Distribution",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
      },
      "reason": "Routine",
      "goalId": "RACD_bednet_dist_1km_radius",
      "subjectCodableConcept": {
        "text": "Residential_Structure"
      },
      "taskTemplate": "ITN_Visit_Structures"
    },
    {
      "identifier": "${UUID()}",
      "prefix": 5,
      "title": "Larval Dipping",
      "description": "Perform a minimum of three larval dipping activities in the operational area",
      "code": "Larval Dipping",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
      },
      "reason": "Investigation",
      "goalId": "Larval_Dipping_Min_3_Sites",
      "subjectCodableConcept": {
        "text": "Breeding_Site"
      },
      "taskTemplate": "Larval_Dipping"
    },
    {
      "identifier": "${UUID()}",
      "prefix": 6,
      "title": "Mosquito Collection",
      "description": "Set a minimum of three mosquito collection traps and complete the mosquito collection process",
      "code": "Mosquito Collection",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
      },
      "reason": "Investigation",
      "goalId": "Mosquito_Collection_Min_3_Traps",
      "subjectCodableConcept": {
        "text": "Mosquito_Collection_Point"
      },
      "taskTemplate": "Mosquito_Collection_Point"
    },
    {
      "identifier": "${UUID()}",
      "prefix": 7,
      "title": "Behaviour Change Communication",
      "description": "Conduct BCC activity",
      "code": "BCC",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
      },
      "reason": "Investigation",
      "goalId": "BCC_Focus",
      "subjectCodableConcept": {
        "text": "Operational_Area"
      },
      "taskTemplate": "BCC_Focus"
    }
  ]
}

Template 2: Imported Case Triggered B1 - 4 actions

Logic:

  • Case Triggered
  • There are 4 actions and goals

...

Code Block
languagejs
titleTemplate 3
linenumberstrue
collapsetrue
{
  "identifier": "${UUID()}",
  "version": "1",
  "name": "${focus_status}-${jurisdiction.name}-${now():format("yyyy-MM-dd", "GMT")}",
  "title": "${focus_status} - ${jurisdiction.name} - ${now():format("yyyy-MM-dd", "GMT")}",
  "status": "active",
  "date": "${now():format("yyyy-MM-dd", "GMT")}",
  "effectivePeriod": {
    "start": "${now():format("yyyy-MM-dd", "GMT")}",
    "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
  },
  "useContext": [
    {
      "code": "interventionType",
      "valueCodableConcept": "FI"
    },
    {
      "code": "fiStatus",
      "valueCodableConcept": "${focus_status}"
    },
    {
      "code": "fiReason",
      "valueCodableConcept": "Case-triggered"
    },
    {
      "code": "opensrpEventId",
      "valueCodableConcept": "${opensrpCaseClassificationEventId}"
    },
    {
      "code": "caseNum",
      "valueCodableConcept": "${case_number}"
    }
  ],
  "jurisdiction": [
    {
      "code": "${revealLocationId}"
    }
  ],
  "serverVersion": 0,
  "goal": [
    {
      "id": "Case_Confirmation",
      "description": "Confirm the index case",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Number of case confirmation forms complete",
          "detail": {
            "detailQuantity": {
              "value": 1,
              "comparator": ">=",
              "unit": "form(s)"
            }
          },
          "due": "${now():toNumber():plus(864000000):format("yyyy-MM-dd")}"
        }
      ]
    },
    {
      "id": "RACD_register_all_families",
      "description": "Register all families and family members in all residential structures enumerated or added (100%) within operational area",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Percent of residential structures with full family registration",
          "detail": {
            "detailQuantity": {
              "value": 100,
              "comparator": ">=",
              "unit": "Percent"
            }
          },
          "due": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
        }
      ]
    },
    {
      "id": "RACD_blood_screening_1km_radius",
      "description": "Visit all residential structures (100%) within a 1 km radius of a confirmed index case and test each registered person",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Number of registered people tested",
          "detail": {
            "detailQuantity": {
              "value": 50,
              "comparator": ">=",
              "unit": "person(s)"
            }
          },
          "due": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
        }
      ]
    },
    {
      "id": "BCC_Focus",
      "description": "Complete at least 1 BCC activity for the operational area",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Number of BCC forms submitted",
          "detail": {
            "detailQuantity": {
              "value": 1,
              "comparator": ">=",
              "unit": "form(s)"
            }
          },
          "due": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
        }
      ]
    }
  ],
  "action": [
    {
      "identifier": "${UUID()}",
      "prefix": 1,
      "title": "Case Confirmation",
      "description": "Confirm the index case",
      "code": "Case Confirmation",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(864000000):format("yyyy-MM-dd")}"
      },
      "reason": "Investigation",
      "goalId": "Case_Confirmation",
      "subjectCodableConcept": {
        "text": "Operational Area"
      },
      "taskTemplate": "Case_Confirmation"
    },
    {
      "identifier": "${UUID()}",
      "prefix": 2,
      "title": "Family Registration",
      "description": "Register all families & family members in all residential structures enumerated (100%) within the operational area",
      "code": "RACD Register Family",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
      },
      "reason": "Investigation",
      "goalId": "RACD_register_all_families",
      "subjectCodableConcept": {
        "text": "Residential_Structure"
      },
      "taskTemplate": "RACD_register_families"
    },
    {
      "identifier": "${UUID()}",
      "prefix": 3,
      "title": "Blood screening",
      "description": "Visit all residential structures (100%) within a 1 km radius of a confirmed index case and test each registered person",
      "code": "Blood Screening",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
      },
      "reason": "Investigation",
      "goalId": "RACD_blood_screening_1km_radius",
      "subjectCodableConcept": {
        "text": "Person"
      },
      "taskTemplate": "RACD_Blood_Screening"
    },
    {
      "identifier": "${UUID()}",
      "prefix": 4,
      "title": "Behaviour Change Communication",
      "description": "Conduct BCC activity",
      "code": "BCC",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
      },
      "reason": "Investigation",
      "goalId": "BCC_Focus",
      "subjectCodableConcept": {
        "text": "Operational_Area"
      },
      "taskTemplate": "BCC_Focus"
    }
  ]
}

Template 3: Local Case Triggered B1 & B2 - 7 Actions | History = Bednet Distribution or Bednet Re-Dipping

Logic:

  • Case Triggered
  • There are 7 actions and goals

...

Code Block
languagejs
titleTemplate 3
linenumberstrue
collapsetrue
{
  "identifier": "${UUID()}",
  "version": "1",
  "name": "${focus_status}-${jurisdiction.name}-${now():format("yyyy-MM-dd", "GMT")}",
  "title": "${focus_status} - ${jurisdiction.name} - ${now():format("yyyy-MM-dd", "GMT")}",
  "status": "active",
  "date": "${now():format("yyyy-MM-dd", "GMT")}",
  "effectivePeriod": {
    "start": "${now():format("yyyy-MM-dd", "GMT")}",
    "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
  },
  "useContext": [
    {
      "code": "interventionType",
      "valueCodableConcept": "FI"
    },
    {
      "code": "fiStatus",
      "valueCodableConcept": "${focus_status}"
    },
    {
      "code": "fiReason",
      "valueCodableConcept": "Case-triggered"
    },
    {
      "code": "opensrpEventId",
      "valueCodableConcept": "${opensrpCaseClassificationEventId}"
    },
    {
      "code": "caseNum",
      "valueCodableConcept": "${case_number}"
    }
  ],
  "jurisdiction": [
    {
      "code": "${revealLocationId}"
    }
  ],
  "serverVersion": 0,
  "goal": [
    {
      "id": "Case_Confirmation",
      "description": "Confirm the index case",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Number of case confirmation forms complete",
          "detail": {
            "detailQuantity": {
              "value": 1,
              "comparator": ">=",
              "unit": "form(s)"
            }
          },
          "due": "${now():toNumber():plus(864000000):format("yyyy-MM-dd")}"
        }
      ]
    },
    {
      "id": "RACD_register_all_families",
      "description": "Register all families and family members in all residential structures enumerated or added (100%) within operational area",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Percent of residential structures with full family registration",
          "detail": {
            "detailQuantity": {
              "value": 100,
              "comparator": ">=",
              "unit": "Percent"
            }
          },
          "due": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
        }
      ]
    },
    {
      "id": "RACD_blood_screening",
      "description": "Visit all residential structures (100%) and test each registered person",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Percent of registered people tested",
          "detail": {
            "detailQuantity": {
              "value": 100,
              "comparator": ">=",
              "unit": "percent"
            }
          },
          "due": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
        }
      ]
    },
	{
      "id": "RACD_bednet_dist_1km_radius",
      "description": "Visit 100% of residential structures in the operational area and provide nets",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Percent of residential structures received nets",
          "detail": {
            "detailQuantity": {
              "value": 90,
              "comparator": ">=",
              "unit": "Percent"
            }
          },
          "due": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
        }
      ]
    },
    {
      "id": "Larval_Dipping_Min_3_Sites",
      "description": "Perform a minimum of three larval dipping activities in the operational area",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Number of larval dipping forms submitted",
          "detail": {
            "detailQuantity": {
              "value": 3,
              "comparator": ">=",
              "unit": "form(s)"
            }
          },
          "due": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
        }
      ]
    },
    {
      "id": "Mosquito_Collection_Min_3_Traps",
      "description": "Set a minimum of three mosquito collection traps and complete the mosquito collection process",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Number of mosquito collection forms submitted",
          "detail": {
            "detailQuantity": {
              "value": 3,
              "comparator": ">=",
              "unit": "form(s)"
            }
          },
          "due": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
        }
      ]
    },
    {
      "id": "BCC_Focus",
      "description": "Complete at least 1 BCC activity for the operational area",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Number of BCC forms submitted",
          "detail": {
            "detailQuantity": {
              "value": 1,
              "comparator": ">=",
              "unit": "form(s)"
            }
          },
          "due": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
        }
      ]
    }
  ],
  "action": [
    {
      "identifier": "${UUID()}",
      "prefix": 1,
      "title": "Case Confirmation",
      "description": "Confirm the index case",
      "code": "Case Confirmation",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(864000000):format("yyyy-MM-dd")}"
      },
      "reason": "Investigation",
      "goalId": "Case_Confirmation",
      "subjectCodableConcept": {
        "text": "Operational Area"
      },
      "taskTemplate": "Case_Confirmation"
    },
    {
      "identifier": "${UUID()}",
      "prefix": 2,
      "title": "Family Registration",
      "description": "Register all families & family members in all residential structures enumerated (100%) within the operational area",
      "code": "RACD Register Family",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
      },
      "reason": "Investigation",
      "goalId": "RACD_register_all_families",
      "subjectCodableConcept": {
        "text": "Residential_Structure"
      },
      "taskTemplate": "RACD_register_families"
    },
    {
      "identifier": "${UUID()}",
      "prefix": 3,
      "title": "Blood screening",
      "description": "Visit all residential structures (100%) and test each registered person",
      "code": "Blood Screening",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
      },
      "reason": "Investigation",
      "goalId": "RACD_blood_screening",
      "subjectCodableConcept": {
        "text": "Person"
      },
      "taskTemplate": "RACD_Blood_Screening"
    },
	{
      "identifier": "${UUID()}",
      "prefix": 4,
      "title": "Bednet Distribution",
      "description": "Visit 100% of residential structures in the operational area and provide nets",
      "code": "Bednet Distribution",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
      },
      "reason": "Routine",
      "goalId": "RACD_bednet_dist_1km_radius",
      "subjectCodableConcept": {
        "text": "Residential_Structure"
      },
      "taskTemplate": "ITN_Visit_Structures"
    },
    {
      "identifier": "${UUID()}",
      "prefix": 5,
      "title": "Larval Dipping",
      "description": "Perform a minimum of three larval dipping activities in the operational area",
      "code": "Larval Dipping",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
      },
      "reason": "Investigation",
      "goalId": "Larval_Dipping_Min_3_Sites",
      "subjectCodableConcept": {
        "text": "Breeding_Site"
      },
      "taskTemplate": "Larval_Dipping"
    },
    {
      "identifier": "${UUID()}",
      "prefix": 6,
      "title": "Mosquito Collection",
      "description": "Set a minimum of three mosquito collection traps and complete the mosquito collection process",
      "code": "Mosquito Collection",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
      },
      "reason": "Investigation",
      "goalId": "Mosquito_Collection_Min_3_Traps",
      "subjectCodableConcept": {
        "text": "Mosquito_Collection_Point"
      },
      "taskTemplate": "Mosquito_Collection_Point"
    },
    {
      "identifier": "${UUID()}",
      "prefix": 7,
      "title": "Behaviour Change Communication",
      "description": "Conduct BCC activity",
      "code": "BCC",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
      },
      "reason": "Investigation",
      "goalId": "BCC_Focus",
      "subjectCodableConcept": {
        "text": "Operational_Area"
      },
      "taskTemplate": "BCC_Focus"
    }
  ]
}

Template 4: Local Case Triggered B1 & B2 - 7 Actions | History = IRS

Logic:

  • Case Triggered
  • There are 7 actions and goals

...

Code Block
languagejs
titleTemplate 3
linenumberstrue
collapsetrue
{
  "identifier": "${UUID()}",
  "version": "1",
  "name": "${focus_status}-${jurisdiction.name}-${now():format("yyyy-MM-dd", "GMT")}",
  "title": "${focus_status} - ${jurisdiction.name} - ${now():format("yyyy-MM-dd", "GMT")}",
  "status": "active",
  "date": "${now():format("yyyy-MM-dd", "GMT")}",
  "effectivePeriod": {
    "start": "${now():format("yyyy-MM-dd", "GMT")}",
    "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
  },
  "useContext": [
    {
      "code": "interventionType",
      "valueCodableConcept": "FI"
    },
    {
      "code": "fiStatus",
      "valueCodableConcept": "${focus_status}"
    },
    {
      "code": "fiReason",
      "valueCodableConcept": "Case-triggered"
    },
    {
      "code": "opensrpEventId",
      "valueCodableConcept": "${opensrpCaseClassificationEventId}"
    },
    {
      "code": "caseNum",
      "valueCodableConcept": "${case_number}"
    }
  ],
  "jurisdiction": [
    {
      "code": "${revealLocationId}"
    }
  ],
  "serverVersion": 0,
  "goal": [
    {
      "id": "Case_Confirmation",
      "description": "Confirm the index case",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Number of case confirmation forms complete",
          "detail": {
            "detailQuantity": {
              "value": 1,
              "comparator": ">=",
              "unit": "form(s)"
            }
          },
          "due": "${now():toNumber():plus(864000000):format("yyyy-MM-dd")}"
        }
      ]
    },
    {
      "id": "RACD_register_all_families",
      "description": "Register all families and family members in all residential structures enumerated or added (100%) within operational area",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Percent of residential structures with full family registration",
          "detail": {
            "detailQuantity": {
              "value": 100,
              "comparator": ">=",
              "unit": "Percent"
            }
          },
          "due": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
        }
      ]
    },
    {
      "id": "RACD_blood_screening",
      "description": "Visit all residential structures (100%) and test each registered person",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Percent of registered people tested",
          "detail": {
            "detailQuantity": {
              "value": 100,
              "comparator": ">=",
              "unit": "percent"
            }
          },
          "due": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
        }
      ]
    },
    {
      "id": "Larval_Dipping_Min_3_Sites",
      "description": "Perform a minimum of three larval dipping activities in the operational area",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Number of larval dipping forms submitted",
          "detail": {
            "detailQuantity": {
              "value": 3,
              "comparator": ">=",
              "unit": "form(s)"
            }
          },
          "due": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
        }
      ]
    },
    {
      "id": "Mosquito_Collection_Min_3_Traps",
      "description": "Set a minimum of three mosquito collection traps and complete the mosquito collection process",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Number of mosquito collection forms submitted",
          "detail": {
            "detailQuantity": {
              "value": 3,
              "comparator": ">=",
              "unit": "form(s)"
            }
          },
          "due": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
        }
      ]
    },
    {
      "id": "BCC_Focus",
      "description": "Complete at least 1 BCC activity for the operational area",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Number of BCC forms submitted",
          "detail": {
            "detailQuantity": {
              "value": 1,
              "comparator": ">=",
              "unit": "form(s)"
            }
          },
          "due": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
        }
      ]
    }
  ],
  "action": [
    {
      "identifier": "${UUID()}",
      "prefix": 1,
      "title": "Case Confirmation",
      "description": "Confirm the index case",
      "code": "Case Confirmation",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(864000000):format("yyyy-MM-dd")}"
      },
      "reason": "Investigation",
      "goalId": "Case_Confirmation",
      "subjectCodableConcept": {
        "text": "Operational Area"
      },
      "taskTemplate": "Case_Confirmation"
    },
    {
      "identifier": "${UUID()}",
      "prefix": 2,
      "title": "Family Registration",
      "description": "Register all families & family members in all residential structures enumerated (100%) within the operational area",
      "code": "RACD Register Family",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
      },
      "reason": "Investigation",
      "goalId": "RACD_register_all_families",
      "subjectCodableConcept": {
        "text": "Residential_Structure"
      },
      "taskTemplate": "RACD_register_families"
    },
    {
      "identifier": "${UUID()}",
      "prefix": 3,
      "title": "Blood screening",
      "description": "Visit all residential structures (100%) and test each registered person",
      "code": "Blood Screening",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
      },
      "reason": "Investigation",
      "goalId": "RACD_blood_screening",
      "subjectCodableConcept": {
        "text": "Person"
      },
      "taskTemplate": "RACD_Blood_Screening"
    },
    {
      "identifier": "${UUID()}",
      "prefix": 4,
      "title": "Larval Dipping",
      "description": "Perform a minimum of three larval dipping activities in the operational area",
      "code": "Larval Dipping",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
      },
      "reason": "Investigation",
      "goalId": "Larval_Dipping_Min_3_Sites",
      "subjectCodableConcept": {
        "text": "Breeding_Site"
      },
      "taskTemplate": "Larval_Dipping"
    },
    {
      "identifier": "${UUID()}",
      "prefix": 5,
      "title": "Mosquito Collection",
      "description": "Set a minimum of three mosquito collection traps and complete the mosquito collection process",
      "code": "Mosquito Collection",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
      },
      "reason": "Investigation",
      "goalId": "Mosquito_Collection_Min_3_Traps",
      "subjectCodableConcept": {
        "text": "Mosquito_Collection_Point"
      },
      "taskTemplate": "Mosquito_Collection_Point"
    },
    {
      "identifier": "${UUID()}",
      "prefix": 6,
      "title": "Behaviour Change Communication",
      "description": "Conduct BCC activity",
      "code": "BCC",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
      },
      "reason": "Investigation",
      "goalId": "BCC_Focus",
      "subjectCodableConcept": {
        "text": "Operational_Area"
      },
      "taskTemplate": "BCC_Focus"
    }
  ]
}

Template 5: Routine - Bednet Distribution - 2 Actions

Logic:

  • Routine
  • There are 2 actions and goals

...

Code Block
languagejs
titleTemplate 5
linenumberstrue
collapsetrue
{
  "identifier": "${UUID()}",
  "version": "1",
  "name": "${focus_status}-${jurisdiction.name}-${now():format("yyyy-MM-dd", "GMT")}",
  "title": "${focus_status} - ${jurisdiction.name} - ${now():format("yyyy-MM-dd", "GMT")}",
  "status": "active",
  "date": "${now():format("yyyy-MM-dd", "GMT")}",
  "effectivePeriod": {
    "start": "${now():format("yyyy-MM-dd", "GMT")}",
    "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
  },
  "useContext": [
    {
      "code": "interventionType",
      "valueCodableConcept": "FI"
    },
    {
      "code": "fiStatus",
      "valueCodableConcept": "${focus_status}"
    },
    {
      "code": "fiReason",
      "valueCodableConcept": "Routine"
    }
  ],
  "jurisdiction": [
    {
      "code": "${revealLocationId}"
    }
  ],
  "serverVersion": 0,
  "goal": [
    {
      "id": "RACD_register_all_families",
      "description": "Register all families and family members in all residential structures enumerated or added (100%) within operational area",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Percent of residential structures with full family registration",
          "detail": {
            "detailQuantity": {
              "value": 100,
              "comparator": ">=",
              "unit": "Percent"
            }
          },
          "due": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
        }
      ]
    },
	{
      "id": "RACD_bednet_dist",
      "description": "Visit 100% of residential structures in the operational area and provide nets",
      "priority": "medium-priority",
      "target": [
        {
          "measure": "Percent of residential structures received nets",
          "detail": {
            "detailQuantity": {
              "value": 90,
              "comparator": ">=",
              "unit": "Percent"
            }
          },
          "due": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
        }
      ]
    }
  ],
  "action": [
    {
      "identifier": "${UUID()}",
      "prefix": 1,
      "title": "Family Registration",
      "description": "Register all families & family members in all residential structures enumerated (100%) within the operational area",
      "code": "RACD Register Family",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
      },
      "reason": "Investigation",
      "goalId": "RACD_register_all_families",
      "subjectCodableConcept": {
        "text": "Residential_Structure"
      },
      "taskTemplate": "RACD_register_families"
    },
	{
      "identifier": "${UUID()}",
      "prefix": 2,
      "title": "Bednet Distribution",
      "description": "Visit 100% of residential structures in the operational area and provide nets",
      "code": "Bednet Distribution",
      "timingPeriod": {
        "start": "${now():format("yyyy-MM-dd", "GMT")}",
        "end": "${now():toNumber():plus(1728000000):format("yyyy-MM-dd")}"
      },
      "reason": "Routine",
      "goalId": "RACD_bednet_dist",
      "subjectCodableConcept": {
        "text": "Residential_Structure"
      },
      "taskTemplate": "ITN_Visit_Structures"
    }
  ]
}


Template 6: Routine - Blood Screening - 2 Actions

Logic:

  • Routine
  • There are 2 actions and goals

...