Research Ethics and De-identification
In Academic Harness:
ethics_protocolkeeps an append-only protocol under.dsh/ethics/<slug>/;deidentifykeeps masked scan/redaction records under.dsh/deidentify/<slug>/. Neither certifies compliance. A human must review every report, consent draft, and output.
Ethics protocol
- Record the study shape.
ethics_protocol startwith study type, population, risks, benefits, consent process, data types, jurisdiction, retention, sharing, funding, and any approval reference. Never invent an approval number, committee, or waiver. - Append sections, not overwrite.
sectionrecords text for consent process, recruitment, data security, incidental findings, or other local requirements; the latest value is derived but earlier events stay. - Generate a consent draft.
consentassembles Markdown from the protocol and your inputs. Every[TO BE COMPLETED]is a real gap. Complete the purpose, procedures, risks, benefits, alternatives, confidentiality, compensation, contacts, withdrawal, and signature blocks; translate and validate with the community where needed. - Run
check. Readpresent,missing, andmanual_checkseparately. Institutional requirements, GDPR lawful basis/DPIA, HIPAA authorization or waiver, vulnerable-population safeguards, and animal/IACUC requirements are always for a human or committee to confirm. - Export Markdown or JSON for the submission file; it is a draft, not an approval.
De-identification
- Scan before sharing.
deidentify scan file=…detects emails, phones, SSNs, MRNs, dates, ages over 89, addresses, URLs/IPs/MACs, account numbers, titled or labelled names, and anyterms/namesyou supply. The report is masked and includes line/column and column summaries for CSV/TSV. - Review the matches. A regex hit is a candidate, not a confirmed
identifier; a zero-match file is not proven safe. Add local names,
identifiers, or project codes with
terms/names. - Redact to a separate file.
policysupports per-type or per-columnmask,type,hash,remove,drop,generalize(year, 90+, ZIP3). The input is never edited in place, and no reversible mapping is written. Custom terms are stored only as hashes; pass the same terms again toredact/verify. A scan with more than 1000 candidate matches is refused for redaction; split the file or narrow the terms rather than accept a partial result. - Verify and review.
verifyrescans the output. Residual matches need a decision: redact again or document why they are false positives/not PHI. Review the redacted file itself, not only the counts.
Guardrails
- Not legal advice, not a HIPAA/GDPR compliance guarantee.
- Local only:
deidentifymakes no model or network call. - Preserve provenance: keep the original file and the masked report; do not destroy the audit trail.
- Use the same slug as
preregister/dmpso the records link.