Skip to content

Main content

Emergency Encounter Duplicate ID Flag

Flag exact repeated encounter IDs after their first appearance without linking records by patient identity.

Loading tool…

Description

Mark duplicate encounter IDs after their first supplied occurrence.

Emergency records distinguish event clocks, retrospective entry times, equipment dates, encounter identifiers and recorded triage or laboratory states. A supplied time gap is not a verified performance measure, and a recorded seal expiry does not establish equipment readiness. Simulation duty fractions and role labels describe training records rather than emergency-care instructions.

Mark duplicate encounter IDs after their first supplied occurrence.

When to use this tool

Use Emergency Encounter Duplicate ID Flag when you already have encounterIds and need to mark duplicate encounter IDs after their first supplied occurrence.

How to use the tool and how it works

  1. Enter encounterIds. 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 duplicateAfterFirst, duplicateIds. Use the output convention below.

Scan encounterIds in order with a seen set; return one duplicateAfterFirst flag per item and distinct duplicateIds in order of their first repeated occurrence.1

Input fieldMeaning and unitsAccepted input
encounterIdsEncounter IdsRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
Output fieldInterpretationReturned shape
duplicateAfterFirstDuplicate After FirstRequired. Array of boolean; maximum items 256.
duplicateIdsDistinct IDs in first-repeat order, which can differ from original first-occurrence order.Required. Array of text; maximum UTF-16 length 8192; maximum items 256.
json
{
  "input": {
    "encounterIds": [
      "E1",
      "E2",
      "E1",
      "E2"
    ]
  },
  "output": {
    "duplicateAfterFirst": [
      false,
      false,
      true,
      true
    ],
    "duplicateIds": [
      "E1",
      "E2"
    ]
  }
}

Limitations and assumptions

  • Comparison is literal; empty IDs are accepted and an empty list returns empty outputs. Repeated strings do not prove duplicate encounters or patient identity.
  • 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

Review the actual event, equipment and laboratory records with verified timing and the complete clinical workflow. Treat local flags and interval arithmetic as record checks; they do not supply triage, response protocols, safe staffing or an assessment of a real emergency.

References

  1. Calculation and input contract: emergency-medicine/emergency-encounter-duplicate-id-flag — tool.io

Similar or alternative tools