Skip to content

Commit

Permalink
track payloadname for submissions from the submissions api
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-h-wang committed Dec 9, 2024
1 parent 1bbd652 commit 5c35630
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ class FHIRConverter(
companion object {

private val clientIdHeader = "client_id"
private val payloadNameHeader = "payloadname"

/**
* Converts a [FhirConvertQueueMessage] into the input to the convert processing
Expand Down Expand Up @@ -157,6 +158,7 @@ class FHIRConverter(
val blobSubFolderName = message.blobSubFolderName

val clientId = message.headers[clientIdHeader]
val payloadName = message.headers[payloadNameHeader]
val sender = clientId?.takeIf { it.isNotBlank() }?.let { settings.findSender(it) }
if (sender == null) {
throw SubmissionSenderNotFound(clientId ?: "", reportId, blobUrl)
Expand All @@ -178,7 +180,8 @@ class FHIRConverter(
// is properly recorded in the report file table with the correct sender
actionHistory.trackExternalInputReport(
report,
BlobAccess.BlobInfo(format, blobUrl, blobDigest.toByteArray())
BlobAccess.BlobInfo(format, blobUrl, blobDigest.toByteArray()),
payloadName
)
actionHistory.trackActionSenderInfo(sender.fullName)

Expand Down

0 comments on commit 5c35630

Please sign in to comment.