FHIR Chat · 500 Internal Server Error · finnish PHR

Stream: finnish PHR

Topic: 500 Internal Server Error


view this post on Zulip Lauri Karppinen (Sep 18 2018 at 12:01):

Hi,

I have been developing fhir json import and export to medical software. Patient information for import and export are already working (Our software gives validate FHIR json-file and that can be PUT to kanta test server). Now it's time to move on study information. My first idea was to create bundle containing all the different observations from our study data. Kanta does not seem to support bundle at all. The idea was be able to upload all the observations at once. Now I'm planning to do multiple observation resource files all referring to patient they belong. Is there any other way to do that? Or does someone have better idea to implement this?

While trying to figure out how to implement importing and exporting of study. I have been trying to upload simple observation for BMI.

I'm using POST to: http://fhirsandbox.kanta.fi/phr-resourceserver/baseStu3/Observation
json:

{ "resourceType": "Observation", "meta": { "profile": [ "http://hl7.org/fhir/StructureDefinition/vitalsigns" ] }, "text": { "status": "generated", "div": "<div xmlns='http://www.w3.org/1999/xhtml'><a name='mm'/></div>" }, "status": "final", "category": [ { "coding": [ { "code": "vital-signs", "system": "http://hl7.org/fhir/observation-category", "display": "Vital Signs" } ] } ], "subject": { "reference": "Patient/907e5750-0c82-1000-a37d-6c5500005666" }, "performer": [ { "reference": "Patient/907e5750-0c82-1000-a37d-6c5500005666" } ], "code": { "coding": [ { "code": "39156-5", "system": "http://loinc.org", "display": "Body mass index (BMI) [Ratio]" } ], "text": "BMI ratio" }, "issued": "2018-09-18T14:05:26+03:00", "valueQuantity": { "value": 16, "unit": "kg/m2" }, "comment": "Some comment here" }

This should be valid fhir and it can be uploaded to other test server.

Kanta test Server gives: 500 Internal Server Error as a return.
A generic error message, given when no more specific message is suitable.

So I don't get any information what is wrong with this observation. Can anyone help and tell me what seems to be the problem with this resource? Am I missing something obvious here? Thanks!

view this post on Zulip Mikael Rinnetmäki (Sep 18 2018 at 17:38):

Not sure whether that's the issue, but I don't see a profile defined for BMI in https://simplifier.net/finnishphr/~resources?category=Profile. There are profiles for body height and body weight, but not for BMI. I've understood you can't store anything in the Finnish PHR unless a suitable profile exists on the platform.

view this post on Zulip Mikael Rinnetmäki (Sep 18 2018 at 17:43):

I tried to have a conversation especially on the vital signs on the platform in the past, as I had understood that that's the one single profile definition that should be implemented identically across all FHIR implementations, but that discussion did not really lead to anything...

view this post on Zulip Eeva Turkka (Sep 19 2018 at 05:44):

I can check the logs why you are getting the error if you message me with more precise point in time, but the correct POST should have /Observation as in POST http://fhirsandbox.kanta.fi/phr-resourceserver/baseStu3/Observation ?

view this post on Zulip Eeva Turkka (Sep 19 2018 at 05:49):

And yes, a resource needs to have a http://phr.kanta.fi -profile refrenced.

view this post on Zulip Lauri Karppinen (Sep 19 2018 at 06:00):

Thanks! This seems to be the problem. I try to demo with height/weight today after I get other stuff done. It seems like we have lot of values in our software which are not supported in Kanta. Thanks.

view this post on Zulip Lauri Karppinen (Sep 19 2018 at 06:03):

I had "/Observation" in the link. Just forgot to put it in my chat post. By the way do you prefer using english in here?

view this post on Zulip Lauri Karppinen (Sep 19 2018 at 06:35):

I tested with Body weight and I get the same error (500 Internal Server Error).

{ "resourceType": "Observation", "meta": { "profile": [ "http://hl7.org/fhir/StructureDefinition/vitalsigns" ] }, "text": { "status": "generated", "div": "<div xmlns='http://www.w3.org/1999/xhtml'>Weight<a name='mm'/></div>" }, "subject": { "reference": "Patient/907e5750-0c82-1000-a37d-6c5500005666" }, "code": { "coding": [ { "code": "29463-7", "system": "http://loinc.org", "display": "Body weight" } ] }, "valueQuantity": { "system": "http://unitsofmeasure.org", "value": "82", "unit": "kg" }, "status": "final" }

This should be valid FHIR and supported in: https://simplifier.net/finnishphr/fiphr-bodyweight-stu3

view this post on Zulip Eeva Turkka (Sep 19 2018 at 06:40):

The profile needs to be referenced in the meta,

"meta": {
"profile": [
"http://phr.kanta.fi/StructureDefinition/fiphr-bodyweight-stu3"
]

this was just saved ok:

{
"resourceType": "Observation",
"meta": {
"profile": [
"http://phr.kanta.fi/StructureDefinition/fiphr-bodyweight-stu3"
]
},
"language": "fi",
"text": {
"status": "generated",
"div": "<div>Code: Body weight (29463-7)<br />Time: 20.11.2017 11:46<br />Result: 78 kg</div>"
},
"identifier": [
{
"system": "urn:ietf:rfc:3986",
"value": "urn:uuid:3aa26139-13ed-4f2a-bdf4-11dd5fd40f0f"
}
],
"status": "final",
"category": [
{
"coding": [
{
"code": "vital-signs",
"system": "http://hl7.org/fhir/observation-category"
}
]
}
],
"code": {
"coding": [
{
"code": "29463-7",
"display": "Body weight",
"system": "http://loinc.org"
}
]
},
"subject": {
"reference": "Patient/91db836a-b62a-49af-8e7a-a94ed90a41d5"
},
"effectiveDateTime": "2017-11-20T11:46:00+02:00",
"issued": "2017-11-20T11:46:00+02:00",
"performer": [
{
"reference": "Patient/91db836a-b62a-49af-8e7a-a94ed90a41d5"
}
],
"valueQuantity": {
"value": 78,
"unit": "kg",
"system": "http://unitsofmeasure.org",
"code": "kg"
}
}

view this post on Zulip Eeva Turkka (Sep 19 2018 at 06:43):

If you need more values supported they can be proposed by interested parties, see here: https://www.kanta.fi/en/system-developers/development-of-the-national-data-content . Both English and Finnish are fine here.

view this post on Zulip Lauri Karppinen (Sep 19 2018 at 08:58):

Kiitos avusta! Viittasin tosiaan aivan väärään osoitteeseen structure defenitionin osalta. Ei ihme, ettei serveri osannut kertoa, mikä oli pielessä. Ja kiitos myös linkistä. Selvitän mille kaikelle tiedolle tarvitsemme tuen, ja teemme lisäysehdoitukset kantaan.


Last updated: Apr 12 2022 at 19:14 UTC