feat(mapping): 实现健康档案映射基线(T-202)

This commit is contained in:
ila
2026-07-07 14:36:40 +08:00
parent 56e1510f6b
commit 767c876519
8 changed files with 278 additions and 7 deletions
+16
View File
@@ -0,0 +1,16 @@
package mapping
import (
"crypto/sha1"
"encoding/hex"
"strings"
)
func GenerateCheckID(sourceSystem, dataType, sourceRecordID, version string) string {
parts := []string{sourceSystem, dataType, sourceRecordID}
if version != "" {
parts = append(parts, version)
}
sum := sha1.Sum([]byte(strings.Join(parts, "|")))
return hex.EncodeToString(sum[:])[:20]
}