Mercurial > hg > orthanc
comparison OrthancServer/Sources/ServerContext.cpp @ 4789:51ec061516c9
Fix handling of option "DeidentifyLogs", notably for tags (0010,0010) and (0010,0020)
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 09 Sep 2021 13:02:33 +0200 |
parents | 2f35e6b765e5 |
children | 434843934307 94616af363ec |
comparison
equal
deleted
inserted
replaced
4788:b47ee86a0d10 | 4789:51ec061516c9 |
---|---|
1985 const std::string& ServerContext::GetDeidentifiedContent(const DicomElement &element) const | 1985 const std::string& ServerContext::GetDeidentifiedContent(const DicomElement &element) const |
1986 { | 1986 { |
1987 static const std::string redactedContent = "*** POTENTIAL PHI ***"; | 1987 static const std::string redactedContent = "*** POTENTIAL PHI ***"; |
1988 | 1988 |
1989 const DicomTag& tag = element.GetTag(); | 1989 const DicomTag& tag = element.GetTag(); |
1990 if (deidentifyLogs_ && ( | 1990 if (deidentifyLogs_ && |
1991 logsDeidentifierRules_.IsCleared(tag) || | 1991 !element.GetValue().GetContent().empty() && |
1992 logsDeidentifierRules_.IsRemoved(tag) || | 1992 logsDeidentifierRules_.IsAlteredTag(tag)) |
1993 logsDeidentifierRules_.IsReplaced(tag))) | |
1994 { | 1993 { |
1995 return redactedContent; | 1994 return redactedContent; |
1996 } | 1995 } |
1997 else | 1996 else |
1998 { | 1997 { |