Afsalmc commented on code in PR #29257:
URL: https://github.com/apache/shardingsphere/pull/29257#discussion_r1413593044


##########
features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/cover/DateKeepYearOnlyAlgorithm.java:
##########
@@ -0,0 +1,28 @@
+package org.apache.shardingsphere.mask.algorithm.replace;
+
+import org.apache.commons.lang3.time.DateUtils;
+import org.apache.shardingsphere.mask.spi.MaskAlgorithm;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+
+public class DateKeepYearOnlyAlgorithm implements MaskAlgorithm<Object, Date> {

Review Comment:
   
https://www.hipaaguide.net/what-is-considered-as-phi-under-hipaa/#:~:text=What%20does%20the%20identifier%20%E2%80%9Cdates%2C%20but%20not%20years%E2%80%9D%20mean%3F
   
   There are scenarios in which only the year is not considered PHI. Masking 
everything except the year allows analytics without breaching PHI.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to