Stream: finnish PHR
Topic: Sending an Observation resource
Kari Vatjus-Anttila (Sep 29 2017 at 09:28):
Hi, I'm working on a demo at OYS TestLab @ PPSHP where we want to demonstrate sending of FHIR resources to Kanta Sandbox from an external system. I'm pretty new with this sandbox and FHIR altogether and I've been only testing the service in this point by using the website and Chrome's Advanced REST Client (ARC)
I've tried to create a Patient resource like it was stated in the documentation and there was no problems with that. I received HTTP 201 Created to confirm it succeeded.
However, next I tried to create a Observation resource containing a Body Temperature reading and tried to submit it. I received the following error:
<OperationOutcome>
<issue>
<severity value="error" />
<code value="processing" />
<diagnostics value="Failed to call access method" />
</issue>
</OperationOutcome>
The message I tried to submit should be a-ok. Is this error message related to user-error or something else?
Below is the test message I tried to send from ARC.
URL: http://fhirsandbox.kanta.fi/phr-resourceserver/baseStu3/Observation
Accept-Charset: utf-8
Accept: application/fhir+xml
Accept-Encoding: gzip
Content-Type: application/fhir+xml
<Observation xmlns="http://hl7.org/fhir">
<meta>
<profile value="http://phr.kanta.fi/StructureDefinition/fiphr-bodytemperature-stu3"/>
</meta>
<language value="fi"/>
<category>
<coding>
<system value="http://hl7.org/fhir/observation-category"/>
<code value="vital-signs"/>
<display value="Vital Signs"/>
</coding>
<text value="Vital Signs"/>
</category>
<effectiveDateTime value="2017-06-16"/>
<issued value="2017-06-15T17:39:44.937Z"/>
<status value="final"/>
<code>
<coding>
<system value="http://loinc.org"/>
<code value="8310-5"/>
<display value="Body temperature"/>
</coding>
</code>
<subject>
<reference value="urn:uuid:d5db9d42-f269-4518-8ed4-c5615eb710fc"/>
</subject>
<performer>
<reference value="urn:uuid:3eeb2a91-cd2c-4710-ae54-ed39909689f4"/>
</performer>
<valueQuantity>
<value value="36.5"/>
<unit value="Cel"/>
<system value="http://unitsofmeasure.org"/>
<code value="Cel"/>
</valueQuantity>
</Observation>
Is there anything I'm doing wrong? Thanks for any help or insight you might offer!
//Kari V-A
Mika Tuomainen (Oct 03 2017 at 11:25):
Profiles, extensions, value sets and code systems SHALL be in JSON format when uploaded to the Finnish PHR platform. Also the resource instances SHALL be in JSON format (XML not supported).
Kari Vatjus-Anttila (Oct 03 2017 at 12:20):
I've tried sending the aforementiond request in JSON format as well. Both end up yielding the same end result:
URL: http://fhirsandbox.kanta.fi/phr-resourceserver/baseStu3/Observation
Accept-Charset: utf-8
Accept: application/fhir+json
Accept-Encoding: gzip
Content-Type: application/fhir+json
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Failed to call access method"
}
]
}
Is there an example somewhere how to do this the correct way or is there something weird going on server side?
Anna Korpela (Oct 04 2017 at 06:34):
We are investigating this problem and we'll inform you as soon as a solution is found.
Could you please give the message you're trying to send in json format? That would help us investigate the problem.
Kari Vatjus-Anttila (Oct 04 2017 at 06:45):
Sure. Here you go. I presume the message structure is ok because if there's a field missing or contains invalid values it usually nags about it.
{
"resourceType": "Observation",
"meta": {
"profile": [
"http://phr.kanta.fi/StructureDefinition/fiphr-bodytemperature-stu3"
]
},
"language": "fi",
"category": [
{
"coding": [
{
"system": "http://hl7.org/fhir/observation-category",
"code": "vital-signs",
"display": "Vital Signs"
}
],
"text": "Vital Signs"
}
],
"effectiveDateTime": "2017-06-16",
"issued": "2017-06-15T17:39:44.937Z",
"status": "final",
"code": [
{
"coding": [
{
"system": "http://loinc.org",
"code": "8310-5",
"display": "Body temperature"
}
],
"text": "Body temperature"
}
],
"subject": [
{
"reference": "urn:uuid:d5db9d42-f269-4518-8ed4-c5615eb710fc"
}
],
"performer": [
{
"reference": "urn:uuid:3eeb2a91-cd2c-4710-ae54-ed39909689f4"
}
],
"valueQuantity": {
"value": "36.5",
"unit": "Cel",
"system": "http://unitsofmeasure.org",
"code": "Cel"
}
}
Matti Uusitalo (Oct 04 2017 at 09:05):
Problem is with the subject reference. They are supposed to be in the format Patient/<uuid> where <uuid> is replaced with the id of the patient. The Patient must exist in PHR before storing the observation. I checked and patient with uuid d5db9d42-f269-4518-8ed4-c5615eb710fc can be found in the database so you should use "Patient/d5db9d42-f269-4518-8ed4-c5615eb710fc" as subject.reference.
Unfortunately the error message wasn't very helpful in this case. I can see how it would be difficult to know what went wrong. We will open a defect about that.
Kari Vatjus-Anttila (Oct 04 2017 at 10:07):
Hi, you're correct. It seems to work now when I modified the subject.reference as instructed. The error message was a bit uninformative which led to confusion. Thank you very much for the support!
Last updated: Apr 12 2022 at 19:14 UTC