medserve icon indicating copy to clipboard operation
medserve copied to clipboard

Get request for Medication resources returns json+fhir not fhir+json

Open dionmcm opened this issue 8 years ago • 4 comments

Originally reported by Dion McMurtrie (Bitbucket: dion_mcmurtrie, GitHub: Unknown)


Strangely requests for everything on the server

  • searches returning bundles
  • get requests for Organization resources
  • get requests for Substance resources

All return application/fhir+json as expected for STU3 except for get requests for Medication resources by identifier, which return application/json+fhir.

Very strange, needs investigation...


  • Bitbucket: https://bitbucket.org/dion_mcmurtrie/medserve/issue/7

dionmcm avatar Oct 30 '17 13:10 dionmcm

Original comment by Dion McMurtrie (Bitbucket: dion_mcmurtrie, GitHub: Unknown)


Thanks John, that's great. I'll leave it open until the HAPI release is taken in medserve.

dionmcm avatar Feb 03 '18 11:02 dionmcm

Original comment by John Grimes (Bitbucket: j0hngr1mes, GitHub: Unknown)


This has now been fixed upstream and will be in the next HAPI release.

dionmcm avatar Feb 02 '18 20:02 dionmcm

Original comment by John Grimes (Bitbucket: j0hngr1mes, GitHub: Unknown)


I have opened this issue against hapi-fhir: https://github.com/jamesagnew/hapi-fhir/issues/837

dionmcm avatar Jan 25 '18 06:01 dionmcm

Original comment by John Grimes (Bitbucket: j0hngr1mes, GitHub: Unknown)


It is influenced by the Accept header:

  • No Accept header -> Content-Type: application/fhir+json;charset=utf-8
  • Accept: application/fhir+json -> Content-Type: application/fhir+json;charset=utf-8 (this is what Polecat uses)
  • Accept: application/json+fhir -> Content-Type: application/json+fhir;charset=utf-8
  • Accept: application/json -> Content-Type: application/json+fhir;charset=utf-8
  • Accept: application/fhir+json,application/json -> Content-Type: application/json+fhir;charset=utf-8
  • Accept: application/json,application/fhir+json -> Content-Type: application/fhir+json;charset=utf-8
  • Accept: application/fhir+json,application/json;q=0.9 -> Content-Type: application/fhir+json;charset=utf-8

Note that currently the "Medication get by id" request within the Postman collection is set up with Accept: application/json+fhir.

dionmcm avatar Jan 25 '18 04:01 dionmcm