HEALTH_PLAN_MEMBER_ID and DEVICE_IDENTIFIER filters, for HIPAA Safe Harbor¶
Source: member-and-device-ids.phisql (spec v1.3.0)
PhiSQL¶
-- HEALTH_PLAN_MEMBER_ID and DEVICE_IDENTIFIER filters, for HIPAA Safe Harbor
-- identifiers (I) and (M). A member ID or a bare serial number only matches when
-- a cue word comes within windowSize tokens before it, e.g. "Member ID: XYZ123456789"
-- or "S/N 4417-A". patterns replaces the default pattern, and cueWords adds to the
-- default cue words (set defaultCueWords = false to use only your own). GS1 and
-- HIBCC UDIs, e.g. (01)00812345000016(21)SN0042, match without a cue word. Set
-- through the existing OPTIONS passthrough; no grammar change. Added to schema
-- 1.3.0 in place (additive). Compiles to member-and-device-ids.json.
POLICY member_and_device_ids;
REDACT HEALTH_PLAN_MEMBER_ID WITH LAST_4
OPTIONS (patterns = ['[A-Z]{3}[0-9]{9}', '[A-Z][0-9]{8}-[0-9]{2}'], cueWords = ['Plan ID'], windowSize = 5);
REDACT DEVICE_IDENTIFIER WITH REDACT
OPTIONS (cueWords = ['Implant ID'], defaultCueWords = true);
Compiles to¶
{
"identifiers": {
"healthPlanMemberId": {
"healthPlanMemberIdFilterStrategies": [
{
"strategy": "LAST_4"
}
],
"patterns": [
"[A-Z]{3}[0-9]{9}",
"[A-Z][0-9]{8}-[0-9]{2}"
],
"cueWords": [
"Plan ID"
],
"windowSize": 5
},
"deviceIdentifier": {
"deviceIdentifierFilterStrategies": [
{
"strategy": "REDACT"
}
],
"cueWords": [
"Implant ID"
],
"defaultCueWords": true
}
}
}