I am trying to store a pdf in Cerner using “document-Reference” fhir api.
I have followed the steps as suggested in below url.
Below are the header & Body details which I have passed
Header:
Authorization: <OAuth2 Bearer Token>(Given the token after successful authentication)
Accept: application/json+fhir
Content-Type: application/fhir+json
Body :
{
"resourceType": "DocumentReference",
"status": "current",
"docStatus": "final",
"type": {
"coding": [
{
"code": "20732501",
"display": "Height Weight Allergy Rule - Text",
"userSelected": true
}
],
"text": "Height Weight Allergy Rule - Text"
},
"subject": {
"reference": "Patient/53663272"
},
"author": [
{
"reference": "Practitioner/21500981"
}
],
"authenticator": {
"reference": "Practitioner/21500981"
},
"content": [
{
"attachment": {
"contentType": "application/xml;charset=utf-8",
"data": "PGh0bWw+Cjx0aXRsZT4gVGVzdCBEb2N1bWVudCA8L3RpdGxlPgoKRG9jdW1lbnQgY29udGVudCEKCjwvaHRtbD4=",
"title": "Height Weight Allergy Rule",
"creation": "2020-07-29T21:02:04.000Z"
}
}
],
"context": {
"encounter": [
{
"reference": "Encounter/4208059"
}
],
"period": {
"start": "2020-01-01T00:00:00.000Z",
"end": "2020-01-01T01:00:00.000Z"
}
}
}
But I am getting response as 403 forbidden,
Response:
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "forbidden",
"expression": [
"http.Authorization"
]
}
]
}
Is there any more info also required/passed to using document-reference api.
Please suggest if I am missing something.
Thanks,
Anubhav