Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

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

Open
dionmcm opened this issue Oct 30, 2017 · 4 comments
Open
Labels
bug Something isn't working minor

Comments

@dionmcm
Copy link
Collaborator

dionmcm commented Oct 30, 2017

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...


@dionmcm
Copy link
Collaborator Author

dionmcm commented Jan 25, 2018

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
Copy link
Collaborator Author

dionmcm commented Jan 25, 2018

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


I have opened this issue against hapi-fhir: hapifhir/hapi-fhir#837

@dionmcm
Copy link
Collaborator Author

dionmcm commented Feb 2, 2018

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


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

@dionmcm
Copy link
Collaborator Author

dionmcm commented Feb 3, 2018

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 dionmcm added minor bug Something isn't working labels May 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working minor
Projects
None yet
Development

No branches or pull requests

1 participant