Attachment display/editing
# support
b
I noticed that the details of content.attachment are obscured in the UI. Is there a way to expose them? Use case: As a data submitter, in order to verify submitted files, I'd like to see attachment details, size, mime type, url, md5 hash (we maintain md5 in an extension)
r
@brian0098 would you mind sending a link to the specifc resoruces that this attachment is attached to? I can take al ook and give some more specific guidance
r
Taking a look at this DocumentReference, I can see that the content is referenced as a
file://....
URI. This is is a pointer to your local file system, which means that the actual binary content of the attachment never made it into our system.
Binary
data is kind of a special case in FHIR
I would suggest taking a look here as a starter on how Medplum handles binary data https://www.medplum.com/docs/fhir-datastore/binary-data
b
Sorry, I was unclear. I wasn't expecting the url to resolve, nor did I want to actually push bytes for the file. Rather, I was hoping the user would be able to see the details of the attachment.
Copy code
"content": [
    {
      "attachment": {
        "extension": [
          {
            "url": "http://aced-idp.org/fhir/StructureDefinition/md5",
            "valueString": "2942bfabb3d05332b66eb128e0842cff"
          },
          {
            "url": "http://aced-idp.org/fhir/StructureDefinition/source_path",
            "valueUrl": "file:///tests/fixtures/dir_to_study/sub-dir/file-3.pdf"
          }
        ],
        "contentType": "application/pdf",
        "url": "file:///tests/fixtures/dir_to_study/sub-dir/file-3.pdf",
        "size": 13264,
        "title": "file-3.pdf",
        "creation": "2024-01-12T11:03:50.613771"
      }
    }
  ],
> Use case: As a data submitter, in order to verify submitted files, I'd like to see attachment details, size, mime type, url, md5 hash (we maintain md5 in an extension)
r
Oh I see. You'd want the user to see these details in the User Interface!
These components are built to be embedded into apps that our users create or their use case. We also use them to build the Medplum Developer App
Right now, our
AttachmentDisplay
doesn't have many configuration options, but we could definitely add some to display that auxilliary information.
Then we'd have to make a separate decision about what configuration to add use in our Medplum App. For that, I think we'd want to poll our community, since we'd be making a decision that affects all of our users
b
Thank You
r
Out of curiosity, do you have plans to develop an app on top of the medplum API? or are you using the Medplum App with clinicians / scientists ?
b
Kicking the tires at this point. Hoping to use app w/ minor mods so researchers can edit/maintain metadata in normalized form. Attracted to lightweight FHIR editing solution so users can edit directly in FHIR vs. transform to tabular, edit, re-import etc
157 Views