Skip to content

Main content

Service Record Source Gap Tool

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

Loading tool…

Description

Compare recorded service dates with supplied source dates and verification flags.

Pharmacy administration separates inventory, document identity, authorization, service timing and financial records from clinical decisions. Matching labels or a positive local predicate can reconcile supplied metadata without authenticating medicine, establishing lawful supply or determining appropriate care.

Compare recorded service dates with supplied source dates and verification flags.

When to use this tool

Use Service Record Source Gap when checking the stated pharmacy record, inventory, timing, coverage or cost convention.

How to use the tool and how it works

  1. Enter serviceIds, recordedDates, sourceDates, sourceVerified. 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 dateMismatches, unverifiedRecords, verifiedDateMatches. Use the output convention below.

Compare recorded service dates with supplied source dates and verification flags. Require aligned arrays and real date-only strings; count mismatches, unverified records and records with both date equality and sourceVerified true.1

Input fieldMeaning and unitsAccepted input
serviceIdsService IdsRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
recordedDatesReal Gregorian YYYY-MM-DD strings, years 0000-9999.Required. Array of text; maximum UTF-16 length 8192; maximum items 256.
sourceDatesReal Gregorian YYYY-MM-DD strings on the same basis; not authenticated sources.Required. Array of text; maximum UTF-16 length 8192; maximum items 256.
sourceVerifiedSupplied source-verification flags; the tool does not authenticate records.Required. Array of boolean; maximum items 256.
Output fieldInterpretationReturned shape
dateMismatchesDate MismatchesRequired. Safe integer.
unverifiedRecordsUnverified RecordsRequired. Safe integer.
verifiedDateMatchesVerified Date MatchesRequired. Safe integer.
json
{
  "input": {
    "serviceIds": [
      "a",
      "b"
    ],
    "recordedDates": [
      "2024-01-01",
      "2024-01-02"
    ],
    "sourceDates": [
      "2024-01-01",
      "2024-01-03"
    ],
    "sourceVerified": [
      true,
      false
    ]
  },
  "output": {
    "dateMismatches": 1,
    "unverifiedRecords": 1,
    "verifiedDateMatches": 1
  }
}

Limitations and assumptions

  • Verification flags and source records are supplied; this does not authenticate a service, establish clinical quality or assess legal record sufficiency.
  • 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

Use verified medicine/service records and applicable professional procedures; consult a qualified pharmacist or other appropriate professional for clinical, legal or safe-supply decisions.

References

  1. Calculation and input contract: community-pharmacy/service-record-source-gap — tool.io

Similar or alternative tools