version: "1.0"
info:
  title: "Patient Medical Records (HIPAA Protected)"
  version: "1.0.0"
  description: "Ingestion of patient records with PHI masking."
  owner: "Compliance Team"

source:
  type: landing
  path: "data/phi_records.csv"
  format: csv

# We reference the HIPAA policy pack for shared rules (SSN/Email validation)
# In the notebook, we'll see how to run this with the pack enabled.

model:
  fields:
    - name: id
      type: integer
    - name: patient_name
      type: string
    - name: ssn
      type: string
    - name: email
      type: string
    - name: diagnosis
      type: string
    - name: admission_date
      type: date
    - name: updated_at
      type: timestamp

# Apply the PII Masking Hook
external_logic:
  type: python
  path: "../../../../lakelogic/tools/hooks/pii_masking.py"
  entrypoint: "mask_pii"
  args:
    entities: ["PERSON", "US_SSN", "EMAIL_ADDRESS"]
    mask_with: "[PROTECTED]"
    columns: ["patient_name", "ssn", "email"]

quarantine:
  enabled: true
  target: "data/quarantine_hipaa.csv"
