How to Upload pdf report in Document Reference API

733 views
Skip to first unread message
Assigned to aaron....@oracle.com by nishant...@gmail.com

thiyagarajan jagan

unread,
Mar 3, 2021, 6:20:29 AM3/3/21
to cerner-fhir...@googlegroups.com
Hi,
I want to upload a pdf report using R4 DocumentReference API. With reference of fhir.cerner.com/millennium/r4/documents/document-reference/#create  I followed implementing the required fields but I got
Error 400. 
On the content attachment section iam using as below
ContentType: application/pdf
data: the pdf file url

The pdf file was already saved in server so i refer the file link by encode the url to base64 and append in the data field.

Please correct me if I am wrong.

Thanks,
Thiyagu.


Fenil Desani (Cerner)

unread,
Mar 4, 2021, 11:06:24 AM3/4/21
to Cerner FHIR Developers
Hello,

You need to pass the Base64'ed actual data in content.attachment.data field

thiyagarajan jagan

unread,
Mar 5, 2021, 2:42:27 AM3/5/21
to cerner-fhir...@googlegroups.com
Thanks for the reply.
I placed the encoded base64 in attachment.data field but I got 414 Request-URI Too Large error. My encoded base64 data size is 20KB.

Please help me out of this.

Thanks,
Thiyagu.

--
You received this message because you are subscribed to the Google Groups "Cerner FHIR Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cerner-fhir-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cerner-fhir-developers/b085ae36-38bf-4470-a63f-973cbc7194a1n%40googlegroups.com.

thiyagarajan jagan

unread,
Mar 5, 2021, 6:35:02 AM3/5/21
to cerner-fhir...@googlegroups.com
Hi,
Now I can able to create Successfully in DocumentReference API. I can received 201 status but if I search for the created record. The record iam inserted not displayed.
X-Request-Id: e074f2a8-463e-80ad-1bc5cd29eb9a

Thanks,
Thiyagu.

thiyagarajan jagan

unread,
Mar 8, 2021, 9:36:59 AM3/8/21
to cerner-fhir...@googlegroups.com
Hi,

Now I can able to create Successfully in DocumentReference API. I can received 201 status but if I searched in the DocumentReference resource for the created record. The record iam inserted not displayed.

Can anybody please help where my uploaded documents saved in cerner.

Thanks,
Thiyagu.

Aaron McGinn (Cerner)

unread,
Mar 10, 2021, 4:40:57 PM3/10/21
to Cerner FHIR Developers
In the Location response header, you will receive the location of your newly created resource. For further investigation, we will need an X-Request-Id from your create transaction.

-Aaron (Cerner)

thiyagarajan jagan

unread,
Mar 11, 2021, 6:07:52 AM3/11/21
to cerner-fhir...@googlegroups.com
Thanks Aaron, 

I can get the saved information from the response location header.

Thanks,
Thiyagu.

thiyagarajan jagan

unread,
Mar 11, 2021, 6:39:57 AM3/11/21
to cerner-fhir...@googlegroups.com
Hi Aaron,

X-Request-Id : d2436242-f1ae-45aa-9c9a-2546fd0e4295

With the response location header I checked the url with postman and I got the pdf binary url from the content section. When I check the Binary url n postman I got Resource not found error.

Can you please help me.

Thanks,
Thiyagu.

Aaron McGinn (Cerner)

unread,
Mar 11, 2021, 4:37:08 PM3/11/21
to Cerner FHIR Developers
What was the document type you provided? It looks like it may not currently be included in the configuration to return through Binary.

-Aaron (Cerner)

thiyagarajan jagan

unread,
Mar 12, 2021, 12:28:35 AM3/12/21
to cerner-fhir...@googlegroups.com
The contentType iam using is application/pdf

Thanks,
Thiyagu.

Aaron McGinn (Cerner)

unread,
Mar 12, 2021, 3:35:36 PM3/12/21
to Cerner FHIR Developers
Apologies, I mean the DocumentReference.type field.

-Aaron (Cerner)

thiyagarajan jagan

unread,
Mar 13, 2021, 2:03:18 AM3/13/21
to cerner-fhir...@googlegroups.com
The DocumentReference.type for your reference, 

type": {
          "coding": [
            {
              "system": "https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/72",
              "code": "20067007",
              'display': "Fundus Photography",
              'userSelected': true
            }
          ],
          "text": "Fundus Photography"
        },
If this type was not available in sandbox, can you pls add.
Thanks,
Thiyagu.


thiyagarajan jagan

unread,
Mar 16, 2021, 7:02:39 AM3/16/21
to cerner-fhir...@googlegroups.com
Aaron,

Any update regarding my previous email?

Thanks,
Thiyagu

Aaron McGinn (Cerner)

unread,
Mar 16, 2021, 3:12:46 PM3/16/21
to Cerner FHIR Developers
What kind of clinical note are you trying to write? The Procedure order was added, which would clinically result in a Procedure. You could then write out a note (Enhanced note: 2572586981) based on the Procedure. Or are you trying to write out images from the procedure? We do not currently support writing multimedia in that form.

-Aaron (Cerner)

thiyagarajan jagan

unread,
Mar 17, 2021, 7:10:56 AM3/17/21
to cerner-fhir...@googlegroups.com
Aaron,
We are writing clinical notes of the patient who had scheduled for fundus Photography exam.
Along with the report we append the Photography image taken for that exam. We did not append any videos in the report

Actually we can successfully write the report to cerner EHR. But we could not access the uploaded report from EHR. 

Thanks,
Thiyagu.

kristof....@gmail.com

unread,
Mar 17, 2021, 10:37:39 AM3/17/21
to Cerner FHIR Developers

Hmmm,

As far as I know, the interface only accepts XHTML in the DocumentReference POST.
The PDF should be generated by Ignite if everything is set up correctly.

Currently creating the DocumentReference works, it returns a 201 with a location header.
You can then request that DocumentReference by Id, which will return a Binary with an XR prefix.
That should be a reference to the Cerner generated PDF from the XHTML you have send.
The problem is that retrieving that PDF currently returns a 500 Internal Server Error. 

As a workaround (the bug has been open for a while), replacing the XR by TR does return the html representation.

Kind regards,

Kristof.




Op woensdag 17 maart 2021 om 12:10:56 UTC+1 schreef thiyagu83.j:

Aaron McGinn (Cerner)

unread,
Mar 17, 2021, 5:17:49 PM3/17/21
to Cerner FHIR Developers
The R4 DocumentReference [1] resource supports `application/pdf`, `text/plain;charset=utf-8`, `text/richtext;charset=utf-8`, `text/rtf;charset=utf-8`, `text/html;charset=utf-8`, `application/xml;charset=utf-8`, and `application/xhtml+xml;charset=utf-8`.


-Aaron (Cerner)

Kristof Taveirne

unread,
Mar 17, 2021, 5:58:17 PM3/17/21
to 'Jenni Syed (Cerner)' via Cerner FHIR Developers
Aha, 

That changed then compared to the dSTU2 implementation. 

Great!

You received this message because you are subscribed to a topic in the Google Groups "Cerner FHIR Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cerner-fhir-developers/--4k110RyAY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cerner-fhir-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cerner-fhir-developers/69d933a8-dd2d-46d7-8356-1766b9c70218n%40googlegroups.com.

Nishanth Namana (Cerner)

unread,
Apr 12, 2021, 3:33:30 PM4/12/21
to Cerner FHIR Developers

Hello Kristof and Thiyagu,

After updating the contentType, were you able to create and retrieve the DocumentReference successfully?

Thanks,
Nishanth (Cerner)
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages