Add documents programatically

I figured this out. Works great.

Now how do I figure out if a document that I’m uploading for a pt already exists? This is what I see when I get all documents for a pt:

[

{

    "filename": "963a8f29-7a06-4c00-9495-2b38a29984d4",

    "id": "17",

    "mimetype": "text/plain",

    "docdate": "2022-05-05"

},

{

    "filename": "963affc1-f361-4d03-80a8-506921439494",

    "id": "18",

    "mimetype": "application/pdf",

    "docdate": "2022-05-06"

}

]

How do I translate that filename into something readable for me? Is there some encryption key? It will just happily accept the same file again and load it to the same location/path.

If the POST to send the document returned the doc ID then I could perhaps store that somewhere and look it up that way. But it just returns true I believe.

Thanks for the help.