Skip to content

Main content

Maternal Record Source Gap Tool

Calculate maternal record source gap from explicit caller-supplied inputs.

Loading tool…

Description

Count matching and mismatching pairs only when neither value equals missingToken; count missing recorded and source values separately.

Exact label matching answers whether supplied strings agree under a chosen vocabulary. It preserves a useful distinction between missing, unknown, ambiguous, and unrecognized records.

Count matching and mismatching pairs only when neither value equals missingToken; count missing recorded and source values separately.

When to use this tool

Use Maternal Record Source Gap when you need an explicit record-label comparison or deterministic key.

How to use the tool and how it works

  1. Enter fieldIds, recordedValues, sourceValues, missingToken. Keep parallel arrays aligned. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read matched, mismatched, missingRecorded, missingSource. Use the output convention below.

Require unique fieldIds and aligned value arrays. Count matching and mismatching pairs only when neither value equals missingToken; count missing recorded and source values separately.1

Input fieldMeaning and unitsAccepted input
fieldIdsField IdsRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
recordedValuesRecorded ValuesRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
sourceValuesSource ValuesRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
missingTokenMissing TokenRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
matchedMatchedRequired. Safe integer.
mismatchedMismatchedRequired. Safe integer.
missingRecordedMissing RecordedRequired. Safe integer.
missingSourceMissing SourceRequired. Safe integer.
json
{
  "input": {
    "fieldIds": [
      "a",
      "b"
    ],
    "recordedValues": [
      "1",
      "?"
    ],
    "sourceValues": [
      "1",
      "2"
    ],
    "missingToken": "?"
  },
  "output": {
    "matched": 1,
    "mismatched": 0,
    "missingRecorded": 1,
    "missingSource": 0
  }
}

Limitations and assumptions

  • Exact strings are compared without normalization; missing counts can overlap and source correctness is not established.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Normalize or reconcile identifiers only under a documented policy, then verify the underlying source records separately.

References

  1. Calculation and input contract: midwifery/maternal-record-source-gap — tool.io

Similar or alternative tools

  • Newborn Sample Parent Label Check

    Compare parent and aliquot labels exactly and combine both flags into matches; serialize expectedParent, sampleId, and recordedAliquot as a JSON array key.

  • Public Product Source Gap

    Count unequal edition pairs, false ingredient matches, and records satisfying both checks.