@peopl-health/nexus 5.56.0-dev.8570 → 5.56.0-dev.8571
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -98,8 +98,10 @@ async function findIntakePatientRecordId(code) {
|
|
|
98
98
|
async function writeUnresolvedRequest({ code, trace, question, details, resolutionAttempted = false, forDoctorOffice = false, category = null, urgency = null, replacesClosedTask = false }) {
|
|
99
99
|
// Everything that changes where the request goes or how fast, so an upgrade is never suppressed
|
|
100
100
|
// as a repeat. Free text is left out on purpose: a reworded retry of the same ask is a repeat.
|
|
101
|
+
// Serialized, not joined: question carries newlines, and a delimiter it can contain is one a
|
|
102
|
+
// future field could collide across.
|
|
101
103
|
const fingerprint = createHash('sha1')
|
|
102
|
-
.update([code, category ||
|
|
104
|
+
.update(JSON.stringify([code, category || null, question || null, urgency || null, Boolean(forDoctorOffice)]))
|
|
103
105
|
.digest('hex');
|
|
104
106
|
let recordId = null;
|
|
105
107
|
const duplicate = !replacesClosedTask && await recentUnresolvedCache.get(code) === fingerprint;
|