Issue trying to call the DocumentReference API (POST) - Millennium

閲覧: 92 回
最初の未読メッセージにスキップ

Snailin Inoa

未読、
2022/12/15 21:20:022022/12/15
To: Oracle Cerner FHIR Developers
Hello team ,

We are trying to call the Create DocumentReference API , but we are getting 500 (Internal server error)

We are following this documentation 
https://fhir.cerner.com/millennium/dstu2/infrastructure/document-reference/#create

We are using our  Cerner Sandbox account

Postman Details 




Sample Request : 

{
  "resourceType": "DocumentReference",
  "subject": {
    "reference": "Patient/12724066"
  },
  "type": {
    "coding": [
      {
        "system": "http://loinc.org",
        "code": "90767-5"
      }
    ]
  },
  "indexed": "2015-11-18T18:00:00Z",
  "status": "current",
  "description": "Rheumatology Note",
  "content": [
    {
      "attachment": {
        "contentType": "application/xhtml+xml;charset=utf-8",
        "data": "<h1>Test</h1>"
      }
    }
  ],
  "context": {
    "encounter": {
      "reference": "Encounter/97963393"
    }
  }
}

The response we are getting is 500 Internal Server error 

Find postman screenshot in the link below :

https://docs.google.com/document/d/1TD_iostbj3NnGjYLh8tv8G4e0A1Bgw3k1gC4CoGgFe0/edit?usp=sharing




Snailin Inoa

未読、
2022/12/15 21:24:122022/12/15
To: Oracle Cerner FHIR Developers
the X-Request-Id is 0dddce9b-7db2-41af-b863-e45e8908d454

Aaron McGinn (Oracle Cerner)

未読、
2022/12/15 22:42:252022/12/15
To: Oracle Cerner FHIR Developers
The content.attachment.data needs to be base64 encoded. This should resolve the error!

As a note, it is recommended to update to use R4 resources as they contain more functionality based on the updated standards and our current implementation. We will be deprecating DSTU2, and this upgrade effort will need to happen at that point anyway.

-Aaron (Oracle Cerner)

Snailin Inoa

未読、
2022/12/21 13:08:082022/12/21
To: Oracle Cerner FHIR Developers
Thanks Aaron , I was able to do it with your recommendation.


I have another question related to the Binary API , according to the documentation that API is used to retrieve the content of the Document. 

I created  a DocumentReference object and the ID is (201527020)

URL to retrieve the DocumentReference : https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/DocumentReference/201527020


In the response of the Get Document Reference API , in the Attachment object you have the URL attribute that point to the Binary API 


Snipped code of the Response

     "attachment": {
                "contentType": "text/html",
                "url": "https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Binary/R-201527020",
                "title": "AX note [867006]",
                "creation": "2022-12-21T17:44:33.000Z"
            },
            "format": {
                "system": "http://ihe.net/fhir/ValueSet/IHE.FormatCode.codesystem",
                "code": "urn:ihe:iti:xds:2017:mimeTypeSufficient",
                "display": "mimeType Sufficient"
            }
        },
        {
            "attachment": {
                "contentType": "application/xml",
                "url": "https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Binary/XML-201527020",
                "title": "AX note [867006]",
                "creation": "2022-12-21T17:44:33.000Z"
            },


The second URL (application/xml) , it is working fine. (https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Binary/XML-201527020)

But the First UR (text/html) is not working ---- it is returning an unauthorized error   (https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Binary/R-201527020)

{
    "resourceType": "OperationOutcome",
    "issue": [
        {
            "severity": "error",
            "code": "forbidden",
            "details": {
                "text": "Forbidden resource"
            },
            "expression": [
                "http.Authorization"
            ]
        }
    ]
}

Can you tell me why this is happening when we try with the URL (https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Binary/R-201527020) ??

thanks


全員に返信
投稿者に返信
転送
新着メール 0 件