Open bwalsh opened 20 hours ago
Transforming data that includes Protected Health Information (PHI) dates requires careful architectural planning to support regulatory compliance, scalability, and, crucially, the ability to maintain utility for analysis. Below are key inflection points to guide this process, with a focus on enabling longitudinal studies and temporal trend analysis while retaining the original sections for completeness.
Uniform Querying for Longitudinal Studies:
Ensure that transformed dates (e.g., shifted dates, relative timestamps or ageAtEvent
) are stored in a consistent format across all FHIR resources. This uniformity allows analysts to query data without needing to account for varying transformation logic.
Temporal Relationships and Trends:
Maintain the ability to analyze sequences and trends (e.g., time from diagnosis to treatment, or treatment response over time) by preserving relative intervals between events during date transformations.
Relative Time Queries:
For scenarios where absolute dates are removed, implement a relativeDateTime
field (e.g., days since diagnosis or days since enrollment) or ageAtEvent
that supports flexible querying and aggregation for temporal patterns.
Custom Query Support for Analysts:
Extend the FHIR API or implement an analytical query layer to provide researchers with built-in support for common temporal queries such as:
Regulatory Compliance:
Asserts that applicable privacy regulations such as HIPAA, GDPR, or local data privacy laws to determine acceptable handling of PHI dates.
Auditability:
Note: ETL authors have to ensure transformations are traceable for compliance audits without reversing anonymization. Submitters will assert only anonymized data is uploaded to the FHIR service.
Consistency:
Lossless Conversion:
Precision Handling:
Preserve Analytical Context:
Avoid transformations that disrupt the logical flow of clinical data, ensuring that analysts can derive meaningful insights.
Regulatory Compliance for Age:
Handling Edge Cases:
birthDate
is missing, invalid, or falls outside reasonable bounds (e.g., extremely old dates). Original Data Retention:
Decide whether to store original PHI dates in a secured, access-controlled archive for specific use cases (e.g., legal requirements).
Schema Updates:
Modify FHIR resource schemas to include fields for relativeDateTime type or "ageAtEvent" extension
Validation for Age Accuracy:
Age
calculations are accurate and consistent across all resources and transformation logic. Edge Case Testing:
birthDate
, extremely old or young ages, and overlapping time periods. ageAtEvent
ExtensionageAtEvent
ExtensionageAtEvent
provides a user-friendly way for analysts to query data without needing to interpret dates. ageAtEvent
is derived, the relative intervals between events are naturally preserved. ageAtEvent
field or extension, potentially complicating schema management and interoperability. ageAtEvent
depends on the availability and correctness of the source datetime fields (e.g., birthDate
). ageAtEvent
may introduce redundancy, requiring additional documentation and governance.ageAtEvent
and datetime fields. ageAtEvent
field simplifies queries and reduces the cognitive load on analysts.Aspect | Shifting Datetime Fields | Introducing ageAtEvent Extension |
---|---|---|
Implementation Effort | Moderate | High |
Schema Changes | None | Requires new field/extension |
Maintenance Effort | Low | Medium |
Analytical Complexity | Medium (requires handling shifts) | Low (explicit age simplifies queries) |
Interoperability Impact | Minimal | Potential challenges with existing systems |
Privacy Compliance | Moderate (risks with deterministic shifts) | High (avoids direct PHI dates) |
Temporal Relationship | Requires careful validation | Naturally preserved through derivation |
User-Friendliness | Moderate | High |
Use Shifting Datetime Fields if:
Use ageAtEvent
Extension if:
Each approach has trade-offs, but introducing an ageAtEvent
extension provides stronger support for user-friendly and privacy-compliant analysis, albeit at a higher initial implementation cost.
@JamedFV You were auto-assigned. Sorry, but I can't seem to remove the assignment?
@teslajoy Can you review and comment?
@RobertJCarroll FYI: Still a draft but wanted to follow up from our last call.
Hi @bwalsh - Thanks for submitting this! Sorry about that, I've got the issues generated through a template auto-assigned to myself so they don't get missed. Would you like this issue assigned to yourself or to someone else for review?
Thanks @JamedFV - if you can assign it back to me. Thanks again
What were you reviewing?
Temporal data:
datetime
andageAtEvent
fields across fhir resourcesReview Date:
December 2024
Relevant Link:
For example see birthDate and deceasedDateTime in https://nih-ncpi.github.io/ncpi-fhir-ig-2/StructureDefinition-ncpi-participant.html#profile
Feedback:
See below